/* ============================================================
   API DOCS PAGE — ritorica.com/developers/api-docs/
   ============================================================ */

:root {
  --ad-blue:   #4072D6;
  --ad-text:   #1a2340;
  --ad-muted:  #6b7280;
  --ad-border: #e5e9f5;
  --ad-bg:     #f7f9ff;
  --ad-dark:   #0f172a;
  --ad-dark2:  #1e293b;
  --ad-dark3:  #334155;
}

/* ── Hero ───────────────────────────────────────────────────── */
.ad-hero {
  background: linear-gradient(135deg, #0d1b4b 0%, #1e3a8a 60%, #4072D6 100%);
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ad-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(99,144,234,.35) 0%, transparent 70%);
  pointer-events: none;
}
.ad-hero__inner { max-width: 760px; margin: 0 auto; position: relative; }
.ad-hero__tag {
  display: inline-block;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.ad-hero__title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 18px;
}
.ad-hero__title span { color: #93b8ff; }
.ad-hero__sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 36px;
}
.ad-hero__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ad-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.ad-hero__btn--primary  { background: #fff; color: var(--ad-blue); box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.ad-hero__btn--secondary{ background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.ad-hero__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.22); }

/* ── Info bar ───────────────────────────────────────────────── */
.ad-bar {
  background: #fff;
  border-bottom: 1px solid var(--ad-border);
  padding: 24px;
}
.ad-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.ad-bar__item {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border-right: 1px solid var(--ad-border);
  font-size: .875rem;
  font-weight: 600;
  color: var(--ad-text);
}
.ad-bar__item:last-child { border-right: none; }
.ad-bar__item svg { color: var(--ad-blue); flex-shrink: 0; }

/* ── Section ────────────────────────────────────────────────── */
.ad-section { padding: 80px 24px; }
.ad-section--alt  { background: var(--ad-bg); }
.ad-section--dark { background: var(--ad-dark); }
.ad-section__inner { max-width: 1140px; margin: 0 auto; }
.ad-section__hd { text-align: center; margin-bottom: 56px; }
.ad-section__tag {
  display: inline-block;
  background: #eef2ff;
  color: var(--ad-blue);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.ad-section--dark .ad-section__tag { background: rgba(64,114,214,.25); color: #93b8ff; }
.ad-section__title { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; color: var(--ad-text); margin-bottom: 14px; }
.ad-section--dark .ad-section__title { color: #fff; }
.ad-section__sub { font-size: 1.0625rem; color: var(--ad-muted); max-width: 580px; margin: 0 auto; line-height: 1.7; }
.ad-section--dark .ad-section__sub { color: rgba(255,255,255,.6); }

/* ── Base URL banner ────────────────────────────────────────── */
.ad-baseurl {
  background: var(--ad-dark2);
  border: 1px solid var(--ad-dark3);
  border-radius: 12px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.ad-baseurl__label {
  font-size: .8125rem;
  font-weight: 700;
  color: #93b8ff;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.ad-baseurl__url {
  font-family: 'Courier New', monospace;
  font-size: .9375rem;
  color: #86efac;
  flex: 1;
}
.ad-baseurl__version {
  background: rgba(64,114,214,.3);
  color: #93b8ff;
  font-size: .8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(64,114,214,.4);
  white-space: nowrap;
}

/* ── Endpoint blocks ────────────────────────────────────────── */
.ad-endpoints { display: flex; flex-direction: column; gap: 16px; }

.ad-ep {
  background: var(--ad-dark2);
  border: 1px solid var(--ad-dark3);
  border-radius: 14px;
  overflow: hidden;
}

.ad-ep__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  cursor: default;
  flex-wrap: wrap;
}
.ad-ep__method {
  font-size: .8125rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: .05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ad-ep__method--post   { background: #14532d; color: #86efac; }
.ad-ep__method--get    { background: #1e3a8a; color: #93b8ff; }
.ad-ep__method--delete { background: #7f1d1d; color: #fca5a5; }

.ad-ep__path {
  font-family: 'Courier New', monospace;
  font-size: .9375rem;
  color: #e2e8f0;
  flex: 1;
}
.ad-ep__desc {
  font-size: .8125rem;
  color: #94a3b8;
  margin-left: auto;
  white-space: nowrap;
}

.ad-ep__body {
  border-top: 1px solid var(--ad-dark3);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ad-ep__col-title {
  font-size: .75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}

/* params table */
.ad-params { width: 100%; border-collapse: collapse; }
.ad-params th {
  font-size: .75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 0 0 8px;
  text-align: left;
  border-bottom: 1px solid var(--ad-dark3);
}
.ad-params td {
  padding: 8px 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .8125rem;
  line-height: 1.5;
}
.ad-params tr:last-child td { border-bottom: none; }
.ad-params td:first-child {
  font-family: 'Courier New', monospace;
  color: #fbbf24;
  padding-right: 12px;
  white-space: nowrap;
}
.ad-params td:nth-child(2) { color: #67e8f9; padding-right: 12px; white-space: nowrap; }
.ad-params td:last-child  { color: #94a3b8; }
.ad-req { color: #f87171; font-size: .7rem; font-weight: 700; }
.ad-opt { color: #64748b;  font-size: .7rem; font-weight: 700; }

/* code example */
.ad-code {
  background: var(--ad-dark);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 16px 18px;
  font-family: 'Courier New', monospace;
  font-size: .8rem;
  color: #e2e8f0;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
}
.ad-code .kw  { color: #f472b6; }
.ad-code .str { color: #86efac; }
.ad-code .key { color: #fbbf24; }
.ad-code .val { color: #67e8f9; }
.ad-code .cm  { color: #475569; }

/* ── Auth section ───────────────────────────────────────────── */
.ad-auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.ad-auth-card {
  background: var(--ad-dark2);
  border: 1px solid var(--ad-dark3);
  border-radius: 14px;
  padding: 24px;
}
.ad-auth-card__title { font-size: .9375rem; font-weight: 700; color: #e2e8f0; margin-bottom: 10px; }
.ad-auth-card__desc  { font-size: .875rem; color: #94a3b8; line-height: 1.65; margin-bottom: 16px; }

/* ── Response / error codes ─────────────────────────────────── */
.ad-codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.ad-code-card {
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.ad-code-card__status {
  font-size: 1.125rem;
  font-weight: 900;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.ad-code-card__status--2xx { color: #059669; }
.ad-code-card__status--4xx { color: #d97706; }
.ad-code-card__status--5xx { color: #dc2626; }
.ad-code-card__name  { font-size: .9rem; font-weight: 700; color: var(--ad-text); margin-bottom: 4px; }
.ad-code-card__desc  { font-size: .8125rem; color: var(--ad-muted); line-height: 1.5; }

/* ── SDK cards ──────────────────────────────────────────────── */
.ad-sdk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.ad-sdk-card {
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: 14px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .2s, transform .2s;
}
.ad-sdk-card:hover { box-shadow: 0 6px 24px rgba(64,114,214,.1); transform: translateY(-2px); }
.ad-sdk-card__top { display: flex; align-items: center; gap: 12px; }
.ad-sdk-card__dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ad-sdk-card__lang { font-size: 1rem; font-weight: 800; color: var(--ad-text); }
.ad-sdk-card__pkg  { font-family: 'Courier New', monospace; font-size: .8125rem; color: var(--ad-muted); background: var(--ad-bg); border: 1px solid var(--ad-border); border-radius: 6px; padding: 4px 10px; }
.ad-sdk-card__desc { font-size: .8125rem; color: var(--ad-muted); line-height: 1.55; flex: 1; }
.ad-sdk-card__link { font-size: .8125rem; font-weight: 700; color: var(--ad-blue); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.ad-sdk-card__link:hover { text-decoration: underline; }

/* ── Rate limit table ───────────────────────────────────────── */
.ad-table-wrap { overflow-x: auto; }
.ad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.ad-table th {
  background: var(--ad-bg);
  font-size: .8rem;
  font-weight: 700;
  color: var(--ad-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--ad-border);
}
.ad-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--ad-border);
  color: var(--ad-text);
  vertical-align: middle;
}
.ad-table tr:last-child td { border-bottom: none; }
.ad-table tr:hover td { background: #f7f9ff; }
.ad-pill {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
}
.ad-pill--sandbox { background: #fef9c3; color: #854d0e; }
.ad-pill--prod    { background: #dcfce7; color: #166534; }

/* ── CTA ────────────────────────────────────────────────────── */
.ad-cta {
  background: linear-gradient(135deg, #0d1b4b 0%, #4072D6 100%);
  padding: 80px 24px;
  text-align: center;
}
.ad-cta__inner { max-width: 640px; margin: 0 auto; }
.ad-cta__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; color: #fff; margin-bottom: 16px; }
.ad-cta__sub   { font-size: 1.0625rem; color: rgba(255,255,255,.75); margin-bottom: 36px; line-height: 1.7; }
.ad-cta__btns  { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ad-cta__btn {
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.ad-cta__btn--primary   { background: #fff; color: var(--ad-blue); box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.ad-cta__btn--secondary { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.ad-cta__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.22); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ad-ep__body { grid-template-columns: 1fr; }
  .ad-ep__desc { display: none; }
}
@media (max-width: 768px) {
  .ad-bar__inner { flex-direction: column; align-items: center; }
  .ad-bar__item  { border-right: none; border-bottom: 1px solid var(--ad-border); width: 100%; }
  .ad-bar__item:last-child { border-bottom: none; }
}
@media (max-width: 480px) {
  .ad-hero    { padding: 72px 20px 60px; }
  .ad-section { padding: 60px 20px; }
  .ad-baseurl { flex-direction: column; gap: 8px; }
}
