/* Cross-page theme and accessibility corrections. Loaded after page styles. */

/* Keep headings on the established display typeface. */
h1, h2, h3, h4,
.policy-wrap h1, .policy-section h2, .faq-wrap h1, .faq-cta h3,
.coll-hero h1, .coll-sec-header h2, .cb-title,
.ch h1, .info-card h3, .form-card h3, .faq-sec h2,
.pdp-name, .notes-box h4, .rev-form h4,
.shop-hero h1, .fs-section h4, .co-title, .co-block h3,
.success-box h2, .ph h1, .pc h2, .sh h1, .svc-card-top h3,
.enq-card h3, .th h1, .tcard h3, .admin-head h1, .login-card h1,
.tl-year, .val-title, .cta-band h2, .dark-tl h2, .split-text h2 {
  font-family:var(--f-display);
}

/* Content that sits on the active theme surface. */
.policy-wrap h1, .faq-wrap h1, .faq-cta h3,
.info-card h3, .form-card h3, .faq-q,
.ci-val, .ci-val a, .tcard h3, .tri-r,
.pc h2, .pc th, .fs-section h4, .sort-sel,
.size-label, .so-ml, .qty-lbl, .q-btn, .notes-box h4,
.nc-val, .co-block h3, .ro-lbl strong, .os-name,
.pb-total, .success-box h2, .svc-card-top h3, .enq-card h3 {
  color:var(--txt);
}
.policy-section p, .policy-section li, .highlight-box p,
.faq-a, .pdp-desc, .tab-panel, .rev-body,
.svc-card-list li { color:var(--txt-soft); }
.bread span { color:var(--muted); }

/* Fields must remain readable in both themes and native option menus. */
.fi, .ti, .rf-input, .coupon-inp,
.field input, .field select, .field textarea,
.toolbar input, .toolbar select, .variant input, .sort-sel {
  background:var(--input-bg);
  color:var(--input-text);
  border-color:var(--border-m);
}
.fi::placeholder, .ti::placeholder, .rf-input::placeholder,
.coupon-inp::placeholder, .field input::placeholder,
.field textarea::placeholder, .toolbar input::placeholder {
  color:var(--input-placeholder);
  opacity:1;
}
.fg label, .field label { color:var(--txt-soft); }
select option { background:var(--surface); color:var(--txt); }
.fi:focus, .ti:focus, .rf-input:focus, .coupon-inp:focus,
.field input:focus, .field select:focus, .field textarea:focus,
.toolbar input:focus, .toolbar select:focus, .variant input:focus {
  border-color:var(--gold);
  background:var(--input-bg);
}

/* Soft panels that previously assumed a black page. */
.faq-cta, .qty-ctrl, .trust-bar, .notes-box, .rev-form,
.tr-info, .variant, .os-emoji, .clear-filters, .small-btn {
  background:var(--panel-soft);
}
.status-steps::before, .st-dot { background:var(--border-m); }
.small-btn { color:var(--txt); }
.small-btn.good { border-color:var(--success); color:var(--success); }
.small-btn.bad { border-color:var(--danger); color:var(--danger); }
.free-tag { background:var(--success-bg); color:var(--success); }
.wa-btn { color:#073B1A; }
.wa-float { color:#073B1A; }
.ftab.on { background:var(--txt); color:var(--bg); }
.btn-gold, .pay-btn, .step-num, .cart-badge, .wish-badge,
.hps-add, .sticky-atb-btn:hover, .add-bag:hover, .btn-primary:hover {
  color:var(--on-accent);
}

/* These blocks are permanently dark, independent of theme selection. */
.ah h1, .coll-hero h1, .shop-hero h1, .ch h1,
.ph h1, .sh h1, .th h1, .dark-tl h2,
.coll-banner .cb-title, .cta-band, .cta-band h2,
.story-visual-caption .svc-name, .coll-card .coll-title {
  color:var(--hero-text);
}
.ah p, .coll-hero p, .shop-hero p, .ch > p,
.ph > p, .sh > p, .th > p, .dark-tl .tl-desc,
.coll-banner .cb-desc, .story-visual-caption .svc-title,
.coll-card .coll-count { color:var(--hero-muted); }
.hps-cat, .hps-tagline, .hps-price { color:var(--hero-muted); }
.ah .eyebrow, .coll-hero .eyebrow, .shop-hero .eyebrow,
.ch .eyebrow, .ph .eyebrow, .sh .eyebrow, .th .eyebrow,
.coll-banner .cb-sub { color:var(--hero-gold); }
.ah .eyebrow::before, .coll-hero .eyebrow::before,
.shop-hero .eyebrow::before, .ch .eyebrow::before,
.ph .eyebrow::before, .sh .eyebrow::before, .th .eyebrow::before {
  background:var(--hero-gold);
}

/* Admin surfaces follow the same theme as the storefront. */
body.admin-page { background:var(--bg); color:var(--txt); }
.admin-actions { display:flex; gap:8px; flex-wrap:wrap; }
.admin-theme { width:44px; height:44px; padding:0; font-size:17px; }
.table-wrap, .inventory-card, .metric, .login-card { box-shadow:var(--shadow-sm); }
dialog { background:var(--surface); color:var(--txt); box-shadow:var(--shadow-lg); }
#dialogCustomer { white-space:pre-line; }
.notice.bad { background:var(--danger-bg); color:var(--danger); }
.notice.good { background:var(--success-bg); color:var(--success); }
.inventory-notice { display:inline-block; margin-left:10px; font-size:12px; }
.status { color:var(--gold); }
tbody tr:hover { background:var(--panel-soft); }

/* Prevent small controls and cards overflowing narrow phones. */
@media (max-width:640px) {
  .admin-shell { padding:24px 14px 64px; }
  .login-card { margin:6vh 14px; padding:26px 20px; }
  .admin-head { flex-direction:column; }
  .admin-actions { width:100%; }
  .admin-actions .btn { flex:1; padding-inline:14px; }
  .toolbar > * { flex:1 1 160px; min-width:0; }
  .co-block, .tcard, .info-card, .form-card, .enq-card { padding:22px 18px; }
  .coupon-row { flex-wrap:wrap; }
  .coupon-inp { min-width:0; flex:1 1 170px; }
  .status-steps { overflow-x:auto; padding-bottom:8px; }
  .step { min-width:72px; }
}
