/* ================= Banner ================= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  background: rgba(10, 10, 10, .97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  transform: translateY(100%);
  transition: transform .35s ease;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cookie-banner-text {
  flex: 1;
  min-width: 260px;
  color: var(--text-secondary);
  font-size: .88rem;
  line-height: 1.6;
}
.cookie-banner-text a { color: var(--blue-bright); font-weight: 600; }

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-cookie-outline,
.btn-cookie-ghost {
  font-weight: 700;
  font-size: .85rem;
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.btn-cookie-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-cookie-outline:hover { border-color: var(--blue); }
.btn-cookie-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
}
.btn-cookie-ghost:hover { color: var(--text); text-decoration: underline; }

/* ================= Modal ================= */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.cookie-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.cookie-modal-overlay[hidden] { display: none; }

.cookie-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(160deg, var(--bg-card), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  transform: translateY(20px) scale(.97);
  transition: transform .3s ease;
}
.cookie-modal-overlay.is-open .cookie-modal { transform: translateY(0) scale(1); }

.cookie-modal h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
  padding-right: 30px;
}
.cookie-modal > p {
  color: var(--text-secondary);
  font-size: .88rem;
  margin-bottom: 24px;
}

.cookie-category {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.cookie-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cookie-category p {
  color: var(--text-secondary);
  font-size: .84rem;
  margin: 0;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease;
}
.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform .2s ease, background .2s ease;
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: var(--blue-cta); border-color: var(--blue-cta); }
.cookie-toggle input:checked + .cookie-toggle-slider::before { transform: translateX(18px); background: #fff; }
.cookie-toggle input:disabled + .cookie-toggle-slider { opacity: .6; cursor: not-allowed; }

.cookie-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.cookie-modal-actions .btn,
.cookie-modal-actions .btn-cookie-outline { flex: 1; min-width: 160px; text-align: center; }

.cookie-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s ease, border-color .2s ease;
}
.cookie-modal-close:hover { color: #fff; border-color: var(--blue); }

.footer-link-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.footer-link-btn:hover { color: var(--blue-bright); }

@media (max-width: 700px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions button { flex: 1; }
}
