/*
 * iOS Liquid Glass Design System — Price That Watch
 * Linked after each page's <style> block so same-specificity rules override.
 */

/* ── Body background: preserved from original ── */

/* ════════════════════════════════════════════════════════════
   GLASS SURFACE — primary cards / section panels
   ════════════════════════════════════════════════════════════ */
.card,
.results-card,
.overall-card,
.scrapers-card,
.pricing-card,
.value-section,
.sources-section,
.faq-section,
.quickstart,
.modal {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.07),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* Hover lift on clickable cards */
.pricing-card:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* Featured pricing card border */
.pricing-card.featured {
  border: 2px solid rgba(26, 115, 232, 0.4) !important;
}

/* Docs sidebar — slightly more opaque for long-read legibility */
.sidebar {
  background: rgba(255, 255, 255, 0.80) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* Docs content sections */
.content section {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* ════════════════════════════════════════════════════════════
   GLASS INNER PANELS — nested surfaces, badges, sub-cards
   ════════════════════════════════════════════════════════════ */
.price-item,
.bp-item,
.tax-item,
.source-badge,
.advanced-search,
.watch-context,
.key-box,
.endpoint-bar,
.stat,
.params-table th {
  background: rgba(245, 248, 255, 0.65) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
}

.price-item:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(26, 115, 232, 0.35) !important;
}

/* Semantic tinted glass panels — preserve color meaning */
.tax-summary {
  background: rgba(226, 238, 254, 0.72) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(26, 115, 232, 0.18) !important;
}

.ai-estimate-warning,
.inferred-model-warning {
  background: rgba(254, 247, 224, 0.82) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-check.likely_authentic {
  background: rgba(230, 244, 234, 0.82) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.auth-check.likely_inauthentic {
  background: rgba(252, 232, 230, 0.82) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.auth-check.some_concerns {
  background: rgba(254, 247, 224, 0.82) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Meta / info badges */
.meta-badge {
  background: rgba(226, 238, 254, 0.75) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(26, 115, 232, 0.12);
}

/* ════════════════════════════════════════════════════════════
   GLASS AUTOCOMPLETE DROPDOWN
   ════════════════════════════════════════════════════════════ */
.autocomplete-items {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1) !important;
}

.autocomplete-item {
  background: transparent !important;
}
.autocomplete-item.active {
  background: rgba(26, 115, 232, 0.09) !important;
}
.autocomplete-item:hover {
  background: rgba(26, 115, 232, 0.06) !important;
}

/* ════════════════════════════════════════════════════════════
   GLASS INPUTS & SELECTS
   ════════════════════════════════════════════════════════════ */
.search-box,
.form-group input,
.form-group select,
.modal input[type="email"],
.api-key-row input,
.try-row input,
.try-row select,
.card input[type="text"],
.card input[type="email"],
.card input[type="password"],
.card input[type="number"],
input[type="text"]:not([class]),
input[type="email"]:not([class]),
input[type="password"]:not([class]) {
  background: rgba(255, 255, 255, 0.58) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.search-box:hover {
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}
.search-box:focus {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(26, 115, 232, 0.45) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(26, 115, 232, 0.12) !important;
}

.form-group input:focus,
.form-group select:focus,
.modal input[type="email"]:focus,
.api-key-row input:focus,
.try-row input:focus,
.try-row select:focus,
input[type="text"]:not([class]):focus,
input[type="email"]:not([class]):focus,
input[type="password"]:not([class]):focus {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(26, 115, 232, 0.45) !important;
}

/* ════════════════════════════════════════════════════════════
   GLASS SECONDARY BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn:not(.btn-primary),
.cta-button.secondary,
.tab-btn,
.copy-key-btn,
.nav-signout,
.btn-secondary,
.share-btn {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
}

.btn:not(.btn-primary):hover,
.cta-button.secondary:hover,
.nav-signout:hover,
.btn-secondary:hover,
.share-btn:hover {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.65) !important;
}

/* nav-signout: visible border + text on light backgrounds */
.nav-signout {
  border-color: rgba(0, 0, 0, 0.18) !important;
  color: #1a73e8 !important;
}

.tab-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.72) !important;
}
.tab-btn.active {
  background: rgba(255, 255, 255, 0.80) !important;
  border-color: rgba(26, 115, 232, 0.25) !important;
}

/* ════════════════════════════════════════════════════════════
   DARK MODE
   ════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  .card,
  .results-card,
  .overall-card,
  .scrapers-card,
  .pricing-card,
  .value-section,
  .sources-section,
  .faq-section,
  .quickstart,
  .modal {
    background: rgba(18, 20, 28, 0.68) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  }

  .pricing-card:hover {
    background: rgba(24, 26, 36, 0.85) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  }

  .pricing-card.featured {
    border: 2px solid rgba(138, 180, 248, 0.28) !important;
  }

  .sidebar {
    background: rgba(14, 16, 22, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  }

  .content section {
    background: rgba(18, 20, 28, 0.68) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  }

  .price-item,
  .bp-item,
  .tax-item,
  .source-badge,
  .advanced-search,
  .watch-context,
  .key-box,
  .endpoint-bar,
  .stat,
  .params-table th {
    background: rgba(28, 30, 40, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
  }

  .price-item:hover {
    background: rgba(36, 38, 50, 0.85) !important;
    border-color: rgba(138, 180, 248, 0.28) !important;
  }

  .tax-summary {
    background: rgba(20, 42, 78, 0.55) !important;
    border: 1px solid rgba(138, 180, 248, 0.14) !important;
  }

  .ai-estimate-warning,
  .inferred-model-warning {
    background: rgba(90, 68, 0, 0.35) !important;
  }

  .auth-check.likely_authentic {
    background: rgba(14, 52, 30, 0.5) !important;
  }
  .auth-check.likely_inauthentic {
    background: rgba(60, 16, 14, 0.5) !important;
  }
  .auth-check.some_concerns {
    background: rgba(70, 52, 0, 0.45) !important;
  }

  .meta-badge {
    background: rgba(20, 42, 78, 0.65) !important;
    border-color: rgba(138, 180, 248, 0.18) !important;
  }

  .autocomplete-items {
    background: rgba(14, 16, 24, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55) !important;
  }

  .autocomplete-item.active {
    background: rgba(138, 180, 248, 0.12) !important;
  }
  .autocomplete-item:hover {
    background: rgba(138, 180, 248, 0.08) !important;
  }

  .search-box,
  .form-group input,
  .form-group select,
  .modal input[type="email"],
  .api-key-row input,
  .try-row input,
  .try-row select,
  .card input[type="text"],
  .card input[type="email"],
  .card input[type="password"],
  .card input[type="number"],
  input[type="text"]:not([class]),
  input[type="email"]:not([class]),
  input[type="password"]:not([class]) {
    background: rgba(28, 30, 40, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e8eaed !important;
  }

  .search-box:hover {
    background: rgba(36, 38, 52, 0.82) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35) !important;
  }
  .search-box:focus {
    background: rgba(36, 38, 52, 0.9) !important;
    border-color: rgba(138, 180, 248, 0.35) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(138, 180, 248, 0.1) !important;
  }

  .form-group input:focus,
  .form-group select:focus,
  .modal input[type="email"]:focus,
  .api-key-row input:focus,
  .try-row input:focus,
  .try-row select:focus,
  input[type="text"]:not([class]):focus,
  input[type="email"]:not([class]):focus,
  input[type="password"]:not([class]):focus {
    background: rgba(36, 38, 52, 0.9) !important;
    border-color: rgba(138, 180, 248, 0.38) !important;
  }

  .btn:not(.btn-primary),
  .cta-button.secondary,
  .tab-btn,
  .copy-key-btn,
  .nav-signout,
  .btn-secondary,
  .share-btn {
    background: rgba(30, 32, 44, 0.68) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e8eaed !important;
  }

  .btn:not(.btn-primary):hover,
  .cta-button.secondary:hover,
  .nav-signout:hover,
  .btn-secondary:hover,
  .share-btn:hover {
    background: rgba(44, 46, 60, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }

  .tab-btn:not(.active):hover {
    background: rgba(44, 46, 60, 0.78) !important;
  }
  .tab-btn.active {
    background: rgba(44, 46, 60, 0.88) !important;
    border-color: rgba(138, 180, 248, 0.28) !important;
    color: #e8eaed !important;
  }
}

/* ── Hamburger nav drawer ─────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 200;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: #202124;
  padding: 4px;
  line-height: 1;
}
#nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: #f2f2f2;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 8px 0 32px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#nav-drawer.open { transform: translateX(0); }
.nav-drawer-header {
  padding: 28px 24px 22px;
  padding-right: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  background: #e0e0e0;
  flex-shrink: 0;
}
.nav-drawer-logo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.nav-drawer-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.nav-drawer-sub {
  font-size: 12px;
  color: rgba(0,0,0,.45);
  margin-top: 2px;
}
.drawer-tier-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  margin-top: 4px;
}
.drawer-tier-pro   { background: rgba(26,115,232,.12);  color: #1557b0; }
.drawer-tier-basic { background: rgba(24,128,56,.12);   color: #188038; }
.drawer-tier-free  { background: rgba(0,0,0,.07);       color: rgba(0,0,0,.5); }
.nav-drawer-divider { height: 1px; background: rgba(0,0,0,.1); }
.nav-drawer-section-divider { height: 1px; background: rgba(0,0,0,.1); margin: 8px 24px; }
.nav-drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0,0,0,.35);
  padding: 6px;
  line-height: 1;
  font-size: 18px;
  transition: color .15s;
}
.nav-drawer-close:hover { color: #1a1a1a; }
#nav-drawer nav {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  flex: 1;
  overflow-y: auto;
}
#nav-drawer nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  color: rgba(0,0,0,.78);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border: none;
  transition: background .15s;
}
#nav-drawer nav a svg { opacity: .7; flex-shrink: 0; }
#nav-drawer nav a:hover { background: rgba(0,0,0,.05); color: #1a1a1a; }
#nav-drawer nav a:hover svg { opacity: .85; }
#nav-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 250;
}
#nav-drawer-overlay.open { display: block; }

@media (max-width: 600px) {
  .nav-hamburger { display: flex; align-items: center; }
  #footer-nav-links { display: none !important; }
}

@media (prefers-color-scheme: dark) {
  .nav-hamburger { color: #e8eaed; }
  #nav-drawer { background: #1c1e1f; box-shadow: 8px 0 32px rgba(0,0,0,.5); }
  .nav-drawer-header { background: #111213; }
  .nav-drawer-logo-wrap { background: #252729; border-color: rgba(255,255,255,.12); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
  .nav-drawer-title { color: #e8eaed; }
  .nav-drawer-sub { color: rgba(232,234,237,.5); }
  .drawer-tier-pro   { background: rgba(66,133,244,.22);  color: #7bb3ff; }
  .drawer-tier-basic { background: rgba(52,168,83,.18);   color: #81c995; }
  .drawer-tier-free  { background: rgba(255,255,255,.09); color: rgba(232,234,237,.55); }
  .nav-drawer-divider { background: rgba(255,255,255,.1); }
  .nav-drawer-section-divider { background: rgba(255,255,255,.1); }
  .nav-drawer-close { color: rgba(255,255,255,.38); }
  .nav-drawer-close:hover { color: #e8eaed; }
  #nav-drawer nav a { color: rgba(255,255,255,.8); }
  #nav-drawer nav a svg { opacity: .7; }
  #nav-drawer nav a:hover { background: rgba(255,255,255,.07); color: #e8eaed; }
  #nav-drawer nav a:hover svg { opacity: 1; }
}
