/* Package 98 REPACK3 — theme runtime + auth header contract.
   Dark MASTER remains visually untouched. Light rules apply only when explicitly selected. */

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] {
  color-scheme: light;
  --bg: #fff9fc;
  --background: #fff9fc;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-2: #fff2f7;
  --card: #ffffff;
  --text: #291923;
  --text-main: #291923;
  --muted: #755f6b;
  --text-muted: #755f6b;
  --line: rgba(91, 45, 66, .17);
  --border: rgba(91, 45, 66, .17);
  --accent: #8f2452;
  --primary: #8f2452;
}

html[data-theme="light"] body.du-public,
html[data-theme="light"] body.du-app,
html[data-theme="light"] body.bk-page {
  background-color: #fff9fc !important;
  color: #291923 !important;
}

html[data-theme="light"] .ambient { opacity: .16 !important; }

html[data-theme="light"] .brand-header,
html[data-theme="light"] .du-header,
html[data-theme="light"] .hr3-header,
html[data-theme="light"] .du-global-footer,
html[data-theme="light"] .hr3-footer,
html[data-theme="light"] nav.bottom-nav {
  background-color: rgba(255, 249, 252, .96) !important;
  color: #291923 !important;
  border-color: rgba(91, 45, 66, .16) !important;
}

html[data-theme="light"] .du-auth-card,
html[data-theme="light"] .du-card,
html[data-theme="light"] .bk-card,
html[data-theme="light"] .panel,
html[data-theme="light"] [class~="card"] {
  background-color: #ffffff !important;
  color: #291923 !important;
  border-color: rgba(91, 45, 66, .16) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background-color: #ffffff !important;
  color: #291923 !important;
  border-color: rgba(91, 45, 66, .22) !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #8c7581 !important; }

html[data-theme="light"] .desktop-nav a,
html[data-theme="light"] .hr3-nav a,
html[data-theme="light"] .hr3-mobile-menu a,
html[data-theme="light"] nav.bottom-nav a,
html[data-theme="light"] .hr3-footer a {
  color: #4d3441 !important;
}
html[data-theme="light"] .desktop-nav a.active,
html[data-theme="light"] .hr3-nav a.active,
html[data-theme="light"] nav.bottom-nav a.active {
  color: #8f2452 !important;
}

html[data-theme="light"] .master-theme-toggle,
html[data-theme="light"] [data-theme-toggle] {
  color: #5c2d43 !important;
  border-color: rgba(91, 45, 66, .18) !important;
}

/* Auth pages: full navigation exists in DOM on every viewport.
   On mobile keep only the compact auth header; on desktop show the canonical main header. */
@media (max-width: 767px) {
  body.page-login .bk98r3-main-header,
  body.page-register .bk98r3-main-header {
    display: none !important;
  }
  body.page-login .mobile67-auth-header,
  body.page-register .mobile67-auth-header {
    display: block !important;
  }
  .bk98r3-auth-theme-toggle {
    margin-left: auto !important;
    margin-right: 6px !important;
  }
}

@media (min-width: 768px) {
  body.page-login .bk98r3-main-header,
  body.page-register .bk98r3-main-header {
    display: flex !important;
  }
  body.page-login .mobile67-auth-header,
  body.page-register .mobile67-auth-header {
    display: none !important;
  }
}

@media (min-width: 768px) {
  body.page-login .bk98r3-main-header .desktop-nav,
  body.page-register .bk98r3-main-header .desktop-nav,
  body.page-login .bk98r3-main-header .hr3-nav,
  body.page-register .bk98r3-main-header .hr3-nav {
    display: flex !important;
  }
  body.page-login .bk98r3-main-header .du-mobile-menu,
  body.page-register .bk98r3-main-header .du-mobile-menu,
  body.page-login .bk98r3-main-header .hr3-mobile-menu,
  body.page-register .bk98r3-main-header .hr3-mobile-menu {
    display: none !important;
  }
}


/* ========================================================================
   BUSINKAMI Package 102 — MOBILE THEME + AUTH HEADER COHERENCE
   Screenshot-driven fixes:
   - auth header has 3 controls in one row (logo / theme / menu), no hero overlap;
   - auth hamburger keeps the canonical 5 public destinations;
   - remember checkbox is a normal touch-sized checkbox, not a 52–56px text input;
   - light theme is internally coherent on mobile home/auth instead of mixing
     dark MASTER surfaces with dark light-theme text.
   Desktop >= 768px is intentionally untouched by this block.
   ======================================================================== */
@media (max-width: 767px) {
  /* Three real columns: the previous 2-column grid pushed the hamburger to row 2. */
  body.page-login .mobile67-auth-header .hr3-header,
  body.page-register .mobile67-auth-header .hr3-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 48px 48px !important;
    grid-template-rows: 58px !important;
    column-gap: 8px !important;
    align-items: center !important;
    min-height: 58px !important;
    height: 58px !important;
    padding: 0 14px !important;
    margin: 0 -12px 10px !important;
  }
  body.page-login .mobile67-auth-header .hr3-logo,
  body.page-register .mobile67-auth-header .hr3-logo {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    justify-self: start !important;
  }
  body.page-login .mobile67-auth-header .bk98r3-auth-theme-toggle,
  body.page-register .mobile67-auth-header .bk98r3-auth-theme-toggle {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: static !important;
    justify-self: center !important;
    margin: 0 !important;
    min-width: 44px !important;
    width: 44px !important;
    min-height: 44px !important;
    height: 44px !important;
  }
  body.page-login .mobile67-auth-header .hr3-mobile-menu,
  body.page-register .mobile67-auth-header .hr3-mobile-menu {
    grid-column: 3 !important;
    grid-row: 1 !important;
    position: relative !important;
    inset: auto !important;
    justify-self: end !important;
    margin: 0 !important;
  }
  body.page-login .mobile67-auth-header .hr3-mobile-menu summary,
  body.page-register .mobile67-auth-header .hr3-mobile-menu summary {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* The generic mobile input rule must never inflate the remember checkbox. */
  body.page-login .du-auth-card .du-form-between > label,
  body.page-register .du-auth-card .du-form-between > label {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 44px !important;
  }
  body.page-login .du-auth-card .du-form-between input[type="checkbox"],
  body.page-register .du-auth-card .du-form-between input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    display: inline-block !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 5px !important;
    accent-color: #ef2b85 !important;
  }

  /* HOME — coherent light mode while keeping the approved hero/photo composition. */
  html[data-theme="light"] body.bk-page {
    background: #fff9fc !important;
    color: #291923 !important;
  }
  html[data-theme="light"] body.bk-page main {
    background: radial-gradient(560px 300px at 8% 12%, rgba(239,43,133,.08), transparent 68%), #fff9fc !important;
    color: #291923 !important;
  }
  html[data-theme="light"] body.bk-page .bk-header {
    background: rgba(255,249,252,.98) !important;
    border-bottom-color: rgba(91,45,66,.16) !important;
  }
  html[data-theme="light"] body.bk-page .bk-logo strong,
  html[data-theme="light"] body.bk-page .bk-menu-button,
  html[data-theme="light"] body.bk-page .bk-icon-btn {
    color: #291923 !important;
  }
  html[data-theme="light"] body.bk-page .bk-mobile-menu {
    background: rgba(255,255,255,.99) !important;
    border-color: rgba(91,45,66,.16) !important;
    box-shadow: 0 18px 46px rgba(70,35,52,.16) !important;
  }
  html[data-theme="light"] body.bk-page .bk-mobile-menu a {
    color: #4d3441 !important;
  }
  html[data-theme="light"] body.bk-page .bk-mobile-menu a + a {
    border-top-color: rgba(91,45,66,.10) !important;
  }
  /* Hero remains a photo-on-dark composition in both themes for readability. */
  html[data-theme="light"] body.bk-page .bk-hero-copy,
  html[data-theme="light"] body.bk-page .bk-hero-copy h1,
  html[data-theme="light"] body.bk-page .bk-hero-copy p {
    color: #ffffff !important;
  }
  html[data-theme="light"] body.bk-page .bk-hero-copy em,
  html[data-theme="light"] body.bk-page .bk-kicker {
    color: #ff3d91 !important;
  }
  html[data-theme="light"] body.bk-page .bk-how,
  html[data-theme="light"] body.bk-page .bk-section,
  html[data-theme="light"] body.bk-page .bk-app-banner,
  html[data-theme="light"] body.bk-page .bk-final-cta {
    color: #291923 !important;
  }
  html[data-theme="light"] body.bk-page .bk-process-step,
  html[data-theme="light"] body.bk-page .bk-event-card,
  html[data-theme="light"] body.bk-page .bk-place-card,
  html[data-theme="light"] body.bk-page .bk-review-card,
  html[data-theme="light"] body.bk-page .bk-home-empty,
  html[data-theme="light"] body.bk-page .bk-app-banner,
  html[data-theme="light"] body.bk-page .bk-final-cta {
    background-color: #ffffff !important;
    color: #291923 !important;
    border-color: rgba(91,45,66,.14) !important;
  }
  html[data-theme="light"] body.bk-page .bk-process-step p,
  html[data-theme="light"] body.bk-page .bk-event-body p,
  html[data-theme="light"] body.bk-page .bk-place-body p,
  html[data-theme="light"] body.bk-page .bk-review-card p,
  html[data-theme="light"] body.bk-page .bk-home-empty span,
  html[data-theme="light"] body.bk-page .bk-app-copy p,
  html[data-theme="light"] body.bk-page .bk-final-cta p {
    color: #755f6b !important;
  }
  html[data-theme="light"] body.bk-page .bk-bottom-nav {
    background: rgba(255,249,252,.985) !important;
    border-top-color: rgba(91,45,66,.16) !important;
  }
  html[data-theme="light"] body.bk-page .bk-bottom-nav a {
    color: #755f6b !important;
  }
  html[data-theme="light"] body.bk-page .bk-bottom-nav a.active {
    color: #d62373 !important;
    background: rgba(214,35,115,.08) !important;
  }

  /* AUTH — light theme must not combine a white card with dark controls/white labels. */
  html[data-theme="light"] body.page-login,
  html[data-theme="light"] body.page-register,
  html[data-theme="light"] body.page-login main,
  html[data-theme="light"] body.page-register main {
    background: #fff9fc !important;
    color: #291923 !important;
  }
  html[data-theme="light"] body.page-login .mobile67-auth-header,
  html[data-theme="light"] body.page-register .mobile67-auth-header,
  html[data-theme="light"] body.page-login .mobile67-auth-header .hr3-header,
  html[data-theme="light"] body.page-register .mobile67-auth-header .hr3-header {
    background: rgba(255,249,252,.98) !important;
    border-bottom-color: rgba(91,45,66,.16) !important;
  }
  html[data-theme="light"] body.page-login .mobile67-auth-header .hr3-logo strong,
  html[data-theme="light"] body.page-register .mobile67-auth-header .hr3-logo strong {
    color: #291923 !important;
  }
  html[data-theme="light"] body.page-login .mobile67-auth-header .master-theme-toggle,
  html[data-theme="light"] body.page-register .mobile67-auth-header .master-theme-toggle,
  html[data-theme="light"] body.page-login .mobile67-auth-header .hr3-mobile-menu summary,
  html[data-theme="light"] body.page-register .mobile67-auth-header .hr3-mobile-menu summary {
    background: #ffffff !important;
    color: #4d3441 !important;
    border-color: rgba(91,45,66,.18) !important;
  }
  html[data-theme="light"] body.page-login .mobile67-auth-header .hr3-mobile-menu > nav,
  html[data-theme="light"] body.page-register .mobile67-auth-header .hr3-mobile-menu > nav {
    background: rgba(255,255,255,.99) !important;
    border-color: rgba(91,45,66,.16) !important;
    box-shadow: 0 22px 60px rgba(70,35,52,.18) !important;
  }
  html[data-theme="light"] body.page-login .mobile67-auth-header .hr3-mobile-menu > nav a,
  html[data-theme="light"] body.page-register .mobile67-auth-header .hr3-mobile-menu > nav a {
    color: #4d3441 !important;
  }
  html[data-theme="light"] body.page-login .mobile67-auth-header .hr3-mobile-menu > nav a + a,
  html[data-theme="light"] body.page-register .mobile67-auth-header .hr3-mobile-menu > nav a + a {
    border-top-color: rgba(91,45,66,.10) !important;
  }
  html[data-theme="light"] body.page-login .du-auth-card,
  html[data-theme="light"] body.page-register .du-auth-card {
    background: #ffffff !important;
    color: #291923 !important;
    border-color: rgba(91,45,66,.16) !important;
    box-shadow: 0 18px 48px rgba(70,35,52,.12) !important;
  }
  html[data-theme="light"] body.page-login .du-auth-card > p:not(.du-legal),
  html[data-theme="light"] body.page-register .du-auth-card > p:not(.du-legal),
  html[data-theme="light"] body.page-login .du-auth-foot,
  html[data-theme="light"] body.page-register .du-auth-foot,
  html[data-theme="light"] body.page-login .du-legal,
  html[data-theme="light"] body.page-register .du-legal {
    color: #755f6b !important;
  }
  html[data-theme="light"] body.page-login .du-auth-card label,
  html[data-theme="light"] body.page-register .du-auth-card label {
    color: #4d3441 !important;
  }
  html[data-theme="light"] body.page-login .du-auth-card input:not([type="checkbox"]):not([type="radio"]),
  html[data-theme="light"] body.page-register .du-auth-card input:not([type="checkbox"]):not([type="radio"]),
  html[data-theme="light"] body.page-login .du-auth-card select,
  html[data-theme="light"] body.page-register .du-auth-card select,
  html[data-theme="light"] body.page-login .du-auth-card textarea,
  html[data-theme="light"] body.page-register .du-auth-card textarea {
    background: #ffffff !important;
    color: #291923 !important;
    border-color: rgba(91,45,66,.28) !important;
  }
  html[data-theme="light"] body.page-login .du-auth-card input::placeholder,
  html[data-theme="light"] body.page-register .du-auth-card input::placeholder {
    color: #8c7581 !important;
  }
}
