/* ═══════════════════════════════════════════════
   CONSENT BANNER & PREFERENCES PANEL
   Uses CSS custom properties from style.css :root
   ═══════════════════════════════════════════════ */

/* Banner */
.consent-banner{position:fixed;bottom:0;left:0;right:0;z-index:9999;background:var(--bg);border-top:1px solid var(--light-gray);box-shadow:0 -2px 20px rgba(0,0,0,0.08);padding:1.25rem 2rem;animation:consentSlideUp .4s ease}
.consent-banner__inner{max-width:680px;margin:0 auto;display:flex;flex-direction:column;gap:1rem}
.consent-banner__text{font-family:var(--sans);font-size:.85rem;color:var(--black);line-height:1.6;margin:0}
.consent-banner__actions{display:flex;gap:.75rem;flex-wrap:wrap}

.consent-btn{padding:.7rem 1.25rem;border-radius:8px;font-family:var(--sans);font-size:.85rem;font-weight:600;cursor:pointer;border:none;background:var(--brand);color:#fff;transition:background .3s;min-height:44px;text-align:center}
.consent-btn:hover{background:var(--brand-dark)}
.consent-btn:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.consent-btn--outline{background:transparent;color:var(--tmmt-navy);border:2px solid var(--tmmt-navy)}
.consent-btn--outline:hover{background:var(--tmmt-bg-surface)}
.consent-btn--muted{background:transparent;color:var(--tmmt-text-muted);border:2px solid var(--tmmt-border)}
.consent-btn--muted:hover{background:var(--tmmt-bg-surface)}

@keyframes consentSlideUp{from{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}

/* Preferences overlay */
.consent-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.4);z-index:10000;animation:consentFadeIn .25s ease}
@keyframes consentFadeIn{from{opacity:0}to{opacity:1}}

/* Preferences panel */
.consent-prefs{position:fixed;bottom:0;left:0;right:0;z-index:10001;background:var(--white);border-radius:var(--radius) var(--radius) 0 0;padding:2rem;max-height:80vh;overflow-y:auto;box-shadow:0 -4px 30px rgba(0,0,0,0.12);animation:consentSlideUp .3s ease}
.consent-prefs__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.35rem}
.consent-prefs__title{font-family:var(--display);font-size:1.2rem;font-weight:700;color:var(--black);margin:0}
.consent-prefs__close{background:none;border:none;font-size:1.5rem;color:var(--gray);cursor:pointer;padding:.25rem .5rem;line-height:1;border-radius:4px;min-height:44px;min-width:44px;display:flex;align-items:center;justify-content:center}
.consent-prefs__close:hover{color:var(--black);background:var(--light-gray)}
.consent-prefs__close:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.consent-prefs__desc{font-size:.8rem;color:var(--gray);margin-bottom:1.5rem;line-height:1.6}

/* Category row */
.consent-category{display:flex;justify-content:space-between;align-items:center;padding:1rem 0;border-bottom:1px solid var(--light-gray)}
.consent-category:last-of-type{border-bottom:none}
.consent-category__info{flex:1;padding-right:1rem}
.consent-category__name{font-family:var(--sans);font-size:.9rem;font-weight:600;color:var(--black)}
.consent-category__desc{font-size:.75rem;color:var(--gray);margin-top:.15rem;line-height:1.5}

/* Toggle switch */
.consent-toggle{position:relative;width:48px;height:26px;flex-shrink:0}
.consent-toggle input{opacity:0;width:0;height:0;position:absolute}
.consent-toggle__slider{position:absolute;inset:0;background:var(--light-gray);border-radius:13px;cursor:pointer;transition:background .3s}
.consent-toggle__slider::before{content:'';position:absolute;bottom:3px;left:3px;width:20px;height:20px;background:var(--white);border-radius:50%;transition:transform .3s;box-shadow:0 1px 3px rgba(0,0,0,0.2)}
.consent-toggle input:checked+.consent-toggle__slider{background:var(--brand)}
.consent-toggle input:checked+.consent-toggle__slider::before{transform:translateX(22px)}
.consent-toggle input:disabled+.consent-toggle__slider{opacity:.5;cursor:not-allowed}
.consent-toggle input:focus-visible+.consent-toggle__slider{outline:3px solid var(--brand);outline-offset:2px}

/* Preferences actions */
.consent-prefs__actions{display:flex;gap:.75rem;margin-top:1.5rem}
.consent-prefs__note{font-size:.7rem;color:var(--gray);margin-top:1rem;line-height:1.5}

/* Footer */
.site-footer{width:100%;background:var(--tmmt-navy-dark);color:var(--tmmt-silver);padding:2.5rem 2rem;margin-top:auto}
.footer-content{max-width:680px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:.75rem}
.footer-brand{font-family:var(--display);font-size:1rem;font-weight:700;color:var(--tmmt-text-on-dark)}
.footer-tagline{font-size:.8rem;color:var(--tmmt-silver);opacity:.8}
.footer-links{display:flex;gap:1.5rem;font-size:.8rem;flex-wrap:wrap;justify-content:center}
.footer-links a{color:var(--tmmt-silver);text-decoration:none;transition:color .2s}
.footer-links a:hover{color:var(--tmmt-bright)}
.footer-copy{font-size:.7rem;color:var(--tmmt-silver);opacity:.5;margin-top:.25rem}

/* Responsive */
@media(max-width:600px){
  .consent-banner{padding:1rem}
  .consent-banner__actions{flex-direction:column}
  .consent-btn{width:100%;min-height:44px;display:flex;align-items:center;justify-content:center}
  .consent-prefs{padding:1.25rem}
  .consent-prefs__actions{flex-direction:column}
  .site-footer{padding:2rem 1rem}
  .footer-links{gap:1rem}
}

/* Reduced motion */
@media(prefers-reduced-motion:reduce){
  .consent-banner,.consent-prefs,.consent-overlay{animation:none}
}
