/* ─── Cookie Banner & Preferences Modal ─── */

/* Banner */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9000;
  background: #001D3A;
  border-top: 1px solid rgba(74,144,164,0.3);
  padding: 24px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
#cookie-banner.visible { transform: translateY(0); }

.cookie-banner-text { flex: 1; min-width: 0; }
.cookie-banner-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: #FFFFFF;
  margin-bottom: 6px;
}
.cookie-banner-body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
}
.cookie-banner-body a {
  color: #4A90A4;
  text-decoration: none;
}
.cookie-banner-body a:hover { text-decoration: underline; }

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 22px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.cookie-btn--accept {
  background: #4A90A4;
  color: #FFFFFF;
}
.cookie-btn--accept:hover { background: #5BA3B8; }
.cookie-btn--reject {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.65);
}
.cookie-btn--reject:hover { border-color: rgba(255,255,255,0.6); color: #FFFFFF; }
.cookie-btn--manage {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.38);
  padding: 10px 0;
  font-size: 9px;
  letter-spacing: 0.14em;
}
.cookie-btn--manage:hover { color: rgba(255,255,255,0.75); }

/* Modal overlay */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(0,10,20,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#cookie-modal.visible {
  opacity: 1;
  pointer-events: all;
}

.cookie-modal-box {
  background: #001D3A;
  border: 1px solid rgba(74,144,164,0.25);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px;
}
.cookie-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.cookie-modal-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 200;
  font-size: 26px;
  color: #FFFFFF;
  line-height: 1.15;
}
.cookie-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  margin-top: 2px;
  transition: color 0.2s;
}
.cookie-modal-close:hover { color: #FFFFFF; }
.cookie-modal-intro {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255,255,255,0.4);
  margin-bottom: 32px;
}
.cookie-modal-intro a { color: #4A90A4; text-decoration: none; }
.cookie-modal-intro a:hover { text-decoration: underline; }

/* Category rows */
.cookie-category {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 22px 0;
}
.cookie-category:last-of-type { border-bottom: 1px solid rgba(255,255,255,0.07); }
.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.cookie-category-name {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
}
.cookie-category-desc {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.35);
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cookie-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.25s;
}
.cookie-toggle-track::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  top: 3px; left: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}
.cookie-toggle input:checked + .cookie-toggle-track {
  background: #4A90A4;
}
.cookie-toggle input:checked + .cookie-toggle-track::after {
  transform: translateX(18px);
  background: #FFFFFF;
}
.cookie-toggle input:disabled + .cookie-toggle-track {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-always-on {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #4A90A4;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Modal footer */
.cookie-modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.cookie-btn--save {
  background: #003366;
  color: #FFFFFF;
  flex: 1;
}
.cookie-btn--save:hover { background: #4A90A4; }
.cookie-btn--accept-all {
  background: #4A90A4;
  color: #FFFFFF;
  flex: 1;
}
.cookie-btn--accept-all:hover { background: #5BA3B8; }

/* Floating preferences trigger (post-consent) */
#cookie-prefs-trigger {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 8900;
  background: rgba(0,29,58,0.9);
  border: 1px solid rgba(74,144,164,0.3);
  color: rgba(255,255,255,0.45);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.25s;
  display: none;
}
#cookie-prefs-trigger.visible { display: block; }
#cookie-prefs-trigger:hover {
  background: #001D3A;
  border-color: #4A90A4;
  color: #FFFFFF;
}

/* Responsive */
@media (max-width: 768px) {
  #cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
  }
  .cookie-banner-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .cookie-btn--accept,
  .cookie-btn--reject { flex: 1; text-align: center; }
  .cookie-modal-box { padding: 32px 24px; }
}
