/* ========================================================
   GDPR COOKIE CONSENT BANNER
   Nike/BBC style — dark theme, fixed bottom bar
======================================================== */

/* ---- BANNER ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2147483647;
  background: linear-gradient(180deg, #11192f 0%, #0d1426 100%);
  border-top: 1px solid rgba(37, 99, 235, .25);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .4);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transform: translateY(0);
  transition: transform .35s ease, opacity .35s ease;
}

.cookie-banner.is-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner-text {
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .65);
  max-width: 640px;
}

.cookie-banner-title {
  display: block;
  font-family: var(--B, 'Plus Jakarta Sans', sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.cookie-banner-desc {
  display: block;
}

.cookie-banner-text a {
  color: var(--blue2, #3b82f6);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-text a:hover {
  color: #fff;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

/* PRIMARY — Accept All */
.cookie-btn-accept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
  white-space: nowrap;
}

.cookie-btn-accept:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.cookie-btn-accept:active {
  transform: translateY(0);
}

/* SECONDARY — Manage Preferences (grey text link, no button) */
.cookie-btn-manage {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 12px;
  color: rgba(255, 255, 255, .4);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease;
}

.cookie-btn-manage:hover {
  color: rgba(255, 255, 255, .7);
}

/* ---- MODAL ---- */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.cookie-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal {
  background: linear-gradient(180deg, #11192f 0%, #0d1426 100%);
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: scroll !important;
  padding: 32px;
  transform: scale(.95);
  transition: transform .25s ease;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.cookie-modal::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

.cookie-modal-overlay.is-open .cookie-modal {
  transform: scale(1);
}

.cookie-modal-header {
  margin-bottom: 24px;
}

.cookie-modal-header h3 {
  margin: 0 0 6px;
  font-family: var(--B, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #fff;
}

.cookie-modal-header p {
  margin: 0;
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .45);
}

/* ---- MODAL DESCRIPTION (collapsible) ---- */
.cookie-modal-desc {
  margin-bottom: 20px;
}

.cookie-modal-desc p {
  margin: 0 0 8px;
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .45);
  overflow: hidden;
  transition: max-height .3s ease;
}

.cookie-modal-desc.is-collapsed p {
  max-height: 60px;
}

.cookie-desc-toggle {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 11px;
  color: var(--blue2, #3b82f6);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s ease;
}

.cookie-desc-toggle:hover {
  color: #fff;
}

/* ---- TOGGLE ROWS ---- */
.cookie-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.cookie-toggle-row:last-child {
  border-bottom: none;
}

.cookie-toggle-info {
  flex: 1;
  min-width: 0;
}

.cookie-toggle-info strong {
  display: block;
  font-family: var(--B, 'Plus Jakarta Sans', sans-serif);
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.cookie-toggle-info small {
  display: block;
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .4);
}

/* ---- TOGGLE SWITCH ---- */
.cookie-toggle-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .25s ease;
}

.cookie-toggle-switch input:checked + .cookie-toggle-slider {
  background: #2563eb;
  border-color: #2563eb;
}

.cookie-toggle-switch input:checked + .cookie-toggle-slider::before {
  transform: translateX(20px);
}

/* Locked toggle — no interaction */
.cookie-toggle-switch.is-locked {
  opacity: .55;
}

.cookie-toggle-switch.is-locked .cookie-toggle-slider {
  cursor: not-allowed;
}

.cookie-toggle-switch.is-locked input:checked + .cookie-toggle-slider {
  background: rgba(37, 99, 235, .5);
  border-color: rgba(37, 99, 235, .4);
}

/* ---- ALWAYS ACTIVE BADGE ---- */
.cookie-always-active {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(37, 99, 235, .15);
  border: 1px solid rgba(37, 99, 235, .3);
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(147, 197, 253, .9);
  white-space: nowrap;
}

/* ---- MODAL BUTTONS ---- */
.cookie-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.cookie-btn-reject {
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .5);
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .8);
  border-color: rgba(255, 255, 255, .2);
}

.cookie-btn-save {
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .8);
  font-family: var(--M, 'DM Mono', monospace);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.cookie-btn-save:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .25);
}

.cookie-modal-actions .cookie-btn-accept {
  padding: 12px 24px;
}

/* ---- MOBILE ---- */
@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 20px;
  }

  .cookie-banner-text {
    font-size: 12px;
    max-width: none;
  }

  .cookie-banner-actions {
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }

  .cookie-btn-accept {
    width: 100%;
    text-align: center;
  }

  .cookie-btn-manage {
    text-align: center;
  }

  .cookie-modal {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .cookie-modal-actions {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .cookie-modal-actions .cookie-btn-accept,
  .cookie-btn-save,
  .cookie-btn-reject {
    width: 100%;
    text-align: center;
  }

  .cookie-banner-title {
    font-size: 15px;
  }
}

/* ---- TEMPORARY: global scrollbar hide to confirm specificity issue ---- */
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
*::-webkit-scrollbar {
  display: none !important;
}
