/* TapasSEO Cookie Banner
 * Standalone module — link this CSS + cookie-banner.js on any page.
 * Uses theme tokens with fallbacks (works even if :root tokens aren't loaded yet).
 * z-index hierarchy: banner=1050  modal=1080  cart drawer=1100 (banner sits below cart)
 * Generated: 2026-04-29
 */

/* ============================================================
   Sticky bottom banner
   ============================================================ */
.tsc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1050;
  display: none;
  padding: 18px 22px calc(18px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 10, 18, 0.94);
  border-top: 1px solid rgba(0, 212, 170, 0.22);
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text, #F0EDE5);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  transform: translateY(120%);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tsc-banner.is-visible { display: block; }
.tsc-banner.is-shown { transform: translateY(0); }

.tsc-banner__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
}

.tsc-banner__copy {
  flex: 1 1 420px;
  margin: 0;
  color: var(--text, #F0EDE5);
}
.tsc-banner__copy strong {
  color: var(--teal, #00D4AA);
  font-weight: 700;
}
.tsc-banner__copy a {
  color: var(--teal, #00D4AA);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 170, 0.4);
  text-underline-offset: 3px;
  transition: color 0.18s, text-decoration-color 0.18s;
}
.tsc-banner__copy a:hover,
.tsc-banner__copy a:focus-visible {
  color: #4DDDC0;
  text-decoration-color: currentColor;
}

.tsc-banner__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tsc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.tsc-btn:focus-visible {
  outline: 2px solid var(--teal, #00D4AA);
  outline-offset: 2px;
}

.tsc-btn--primary {
  background: linear-gradient(135deg, var(--teal, #00D4AA) 0%, #00b894 100%);
  color: #0A0A12;
  box-shadow: 0 4px 14px rgba(0, 212, 170, 0.32);
  font-weight: 700;
}
.tsc-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.45);
}

.tsc-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #F0EDE5);
  border-color: rgba(255, 255, 255, 0.18);
}
.tsc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 212, 170, 0.45);
  color: var(--teal, #00D4AA);
}

.tsc-btn--link {
  background: transparent;
  color: var(--text-muted, #A09890);
  padding: 10px 14px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(160, 152, 144, 0.3);
  text-underline-offset: 3px;
  border-color: transparent;
}
.tsc-btn--link:hover {
  color: var(--text, #F0EDE5);
  text-decoration-color: currentColor;
}

/* ============================================================
   Modal
   ============================================================ */
.tsc-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.tsc-modal.is-visible { display: flex; }

.tsc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 220ms ease-out;
  cursor: pointer;
}
.tsc-modal.is-shown .tsc-modal__backdrop { opacity: 1; }

.tsc-modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background: var(--dark-card, #1A1A28);
  border: 1px solid rgba(0, 212, 170, 0.22);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  color: var(--text, #F0EDE5);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease-out;
}
.tsc-modal.is-shown .tsc-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.tsc-modal__header {
  flex-shrink: 0;
  padding: 22px 26px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.tsc-modal__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text, #F0EDE5);
}
.tsc-modal__intro {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted, #A09890);
  line-height: 1.55;
}
.tsc-modal__close {
  flex-shrink: 0;
  width: 38px; height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 50%;
  color: var(--text-muted, #A09890);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tsc-modal__close:hover { background: rgba(229, 62, 62, 0.18); color: #ff8585; }
.tsc-modal__close:focus-visible {
  outline: 2px solid var(--teal, #00D4AA);
  outline-offset: 2px;
}

.tsc-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tsc-cat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  align-items: start;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}
.tsc-cat__label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #F0EDE5);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tsc-cat__pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 212, 170, 0.12);
  color: var(--teal, #00D4AA);
  border: 1px solid rgba(0, 212, 170, 0.3);
}
.tsc-cat__desc {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #A09890);
  line-height: 1.55;
}

/* iOS-style toggle built on a real <input type="checkbox"> */
.tsc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.tsc-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.tsc-toggle__track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transition: background 0.22s ease, border-color 0.22s ease;
}
.tsc-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #F0EDE5;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.tsc-toggle input:checked ~ .tsc-toggle__track {
  background: var(--teal, #00D4AA);
  border-color: var(--teal, #00D4AA);
}
.tsc-toggle input:checked ~ .tsc-toggle__track::after {
  transform: translateX(18px);
  background: #0A0A12;
}
.tsc-toggle input:focus-visible ~ .tsc-toggle__track {
  outline: 2px solid var(--teal, #00D4AA);
  outline-offset: 2px;
}
.tsc-toggle input:disabled {
  cursor: not-allowed;
}
.tsc-toggle input:disabled ~ .tsc-toggle__track {
  background: rgba(0, 212, 170, 0.45);
  border-color: rgba(0, 212, 170, 0.55);
  opacity: 0.85;
}

.tsc-modal__footer {
  flex-shrink: 0;
  padding: 16px 26px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  justify-content: space-between;
  background: var(--dark-card, #1A1A28);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}
.tsc-modal__policy {
  font-size: 0.85rem;
  color: var(--text-muted, #A09890);
  margin: 0;
}
.tsc-modal__policy a {
  color: var(--teal, #00D4AA);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 170, 0.35);
  text-underline-offset: 3px;
}
.tsc-modal__policy a:hover { color: #4DDDC0; }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 640px) {
  .tsc-banner { padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px)); font-size: 0.88rem; }
  .tsc-banner__inner { gap: 14px; }
  .tsc-banner__actions { width: 100%; }
  .tsc-banner__actions .tsc-btn { flex: 1 1 0; text-align: center; padding: 12px 16px; font-size: 0.88rem; }

  .tsc-modal { padding: 0; align-items: flex-end; }
  .tsc-modal__panel {
    max-width: none;
    width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
  }
  .tsc-modal.is-shown .tsc-modal__panel { transform: translateY(0); }
  .tsc-modal__footer { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .tsc-modal__title { font-size: 1.2rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .tsc-banner,
  .tsc-modal__backdrop,
  .tsc-modal__panel,
  .tsc-toggle__track,
  .tsc-toggle__track::after,
  .tsc-btn { transition: none; }
}
