/* Cookie-consent banner — see consent.js. A bottom-centred card with three stacked
   choices (Accept all / Necessary only / Settings) and a per-category panel.
   Theme-aware; motion is transform/opacity only and yields to reduced-motion. */

.kobe-consent{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;                 /* above nav + cart drawer */
  display: flex;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;          /* only the card is interactive */
  transform: translateY(120%);   /* .is-in slides it up */
  opacity: 0;
  transition: transform .42s cubic-bezier(.16,1,.3,1), opacity .42s ease;
}
.kobe-consent.is-in{ transform: translateY(0); opacity: 1; }

.kobe-consent__card{
  pointer-events: auto;
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--gold-leaf);
  border-top: 2px solid var(--gold-leaf);
  background: rgba(6, 16, 27, .97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  color: var(--aged-parchment);
}

.kobe-consent__title{
  display: flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: var(--fs-3);
  font-weight: 600;
  color: var(--gold-leaf);
  margin-bottom: 10px;
}
.kobe-consent__body{
  font-family: var(--thai);
  font-size: var(--fs-1);
  line-height: 1.6;
  margin: 0 0 14px;
  opacity: .9;
}

.kobe-consent__links{
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
  font-size: var(--fs-1);
}
.kobe-consent__link{
  color: var(--gold-leaf);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kobe-consent__link:hover{ opacity: .8; }
.kobe-consent__sep{ opacity: .35; }

/* ── Per-category panel (revealed by "Settings") ── */
.kobe-consent__prefs{
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 18px; padding: 14px 0;
  border-top: 1px solid rgba(201,168,76,.2);
  border-bottom: 1px solid rgba(201,168,76,.2);
}
.kobe-consent__cat{ display: flex; align-items: flex-start; gap: 12px; }
.kobe-consent__cat-text{ flex: 1 1 auto; min-width: 0; }
.kobe-consent__cat-h{ font-size: var(--fs-1); font-weight: 600; margin-bottom: 2px; }
.kobe-consent__cat-d{ font-size: 12px; line-height: 1.5; opacity: .62; }
.kobe-consent__always{
  flex: 0 0 auto; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--gold-leaf);
  padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(201,168,76,.45);
}

/* Toggle switch */
.kobe-consent__sw{ flex: 0 0 auto; position: relative; width: 42px; height: 24px; cursor: pointer; }
.kobe-consent__sw input{ position: absolute; opacity: 0; width: 0; height: 0; }
.kobe-consent__sw i{
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(201,168,76,.35);
  transition: background .2s, border-color .2s;
}
.kobe-consent__sw i::after{
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--aged-parchment);
  transition: transform .2s cubic-bezier(.16,1,.3,1);
}
.kobe-consent__sw input:checked + i{ background: var(--gold-leaf); border-color: var(--gold-leaf); }
.kobe-consent__sw input:checked + i::after{ transform: translateX(18px); background: var(--char-black); }
.kobe-consent__sw input:focus-visible + i{ outline: 2px solid var(--gold-leaf); outline-offset: 2px; }

/* ── Actions: stacked, full-width ── */
.kobe-consent__actions{ display: flex; flex-direction: column; gap: 8px; }
.kobe-consent__btn{
  width: 100%;
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 600;
  letter-spacing: .04em;
  padding: 13px 18px;
  border-radius: 10px;
  border: 1px solid var(--gold-leaf);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .12s ease;
}
.kobe-consent__btn:active{ transform: translateY(1px); }
.kobe-consent__btn:focus-visible{ outline: 2px solid var(--gold-leaf); outline-offset: 2px; }
.kobe-consent__btn--gold{ background: var(--gold-leaf); color: var(--char-black); }
.kobe-consent__btn--gold:hover{ background: #b59644; border-color: #b59644; }
.kobe-consent__btn--ghost{ background: transparent; color: var(--gold-leaf); }
.kobe-consent__btn--ghost:hover{ background: rgba(201,168,76,.10); }
/* Tertiary: present but visually quietest — it opens settings, it isn't a choice. */
.kobe-consent__btn--quiet{
  background: rgba(201,168,76,.08); color: var(--aged-parchment);
  border-color: rgba(201,168,76,.25);
}
.kobe-consent__btn--quiet:hover{ background: rgba(201,168,76,.16); border-color: var(--gold-leaf); }

/* Light theme — gold-leaf fails contrast on white, so use the darker gold-ink. */
html[data-theme="light"] .kobe-consent__card{
  background: rgba(255,255,255,.98);
  border-color: rgba(154,122,40,.55);
  border-top-color: var(--gold-ink);
  box-shadow: 0 18px 50px rgba(34,28,21,.16);
  color: var(--ink);
}
html[data-theme="light"] .kobe-consent__title,
html[data-theme="light"] .kobe-consent__link,
html[data-theme="light"] .kobe-consent__always{ color: var(--gold-ink); }
html[data-theme="light"] .kobe-consent__always{ border-color: rgba(154,122,40,.45); }
html[data-theme="light"] .kobe-consent__prefs{ border-color: rgba(34,28,21,.12); }
html[data-theme="light"] .kobe-consent__sw i{ background: rgba(34,28,21,.12); border-color: rgba(154,122,40,.4); }
html[data-theme="light"] .kobe-consent__sw i::after{ background: #fff; }
html[data-theme="light"] .kobe-consent__sw input:checked + i{ background: var(--gold-ink); border-color: var(--gold-ink); }
html[data-theme="light"] .kobe-consent__sw input:checked + i::after{ background: #fff; }
html[data-theme="light"] .kobe-consent__btn{ border-color: var(--gold-ink); }
html[data-theme="light"] .kobe-consent__btn--gold{ background: var(--gold-ink); color: #fff; }
html[data-theme="light"] .kobe-consent__btn--gold:hover{ background: #866a22; border-color: #866a22; }
html[data-theme="light"] .kobe-consent__btn--ghost{ color: var(--gold-ink); }
html[data-theme="light"] .kobe-consent__btn--ghost:hover{ background: rgba(154,122,40,.10); }
html[data-theme="light"] .kobe-consent__btn--quiet{
  background: rgba(154,122,40,.07); color: var(--ink); border-color: rgba(154,122,40,.25);
}

/* Cookie-settings reopen link in the footer bar. */
.foot__cookies{
  background: none; border: 0; padding: 0; margin-left: 10px;
  font: inherit; color: inherit; opacity: .8;
  text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}
.foot__cookies:hover{ opacity: 1; color: var(--gold-leaf); }
html[data-theme="light"] .foot__cookies:hover{ color: var(--gold-ink); }

@media (prefers-reduced-motion: reduce){
  .kobe-consent{ transition: opacity .2s ease; transform: none; }
  .kobe-consent.is-in{ transform: none; }
  .kobe-consent__btn:active{ transform: none; }
  .kobe-consent__sw i::after{ transition: none; }
}
