/* Cookie banner + preferences (EU/ES compliance baseline) */
:root {
  --cookie-bg: rgba(7, 18, 26, 0.96);
  --cookie-border: rgba(148, 163, 184, 0.24);
  --cookie-accent: #14b8a6;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--cookie-bg);
  border: 1px solid var(--cookie-border);
  box-shadow: 0 18px 46px rgba(6, 12, 20, 0.72);
  display: grid;
  gap: 12px;
}

.cookie-banner h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.cookie-banner p {
  margin: 0;
  color: #b6c2d1;
  font-size: 13px;
  line-height: 1.55;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

.cookie-btn.primary {
  background: var(--cookie-accent);
  color: #041017;
}

.cookie-btn.ghost {
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.35);
}

.cookie-link {
  color: #9bdcd5;
  text-decoration: underline;
  font-size: 13px;
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  background: rgba(3, 7, 12, 0.72);
  padding: 20px;
}

.cookie-preferences.is-open {
  display: flex;
}

.cookie-legal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  background: rgba(3, 7, 12, 0.72);
  padding: 20px;
}

.cookie-legal.is-open {
  display: flex;
}

.cookie-legal .cookie-modal {
  max-height: min(70vh, 640px);
  overflow: auto;
}

.cookie-legal h5 {
  margin: 16px 0 6px;
  font-size: 15px;
}

.cookie-modal {
  width: min(560px, 100%);
  background: #0c1822;
  border: 1px solid var(--cookie-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(5, 10, 16, 0.8);
}

.cookie-modal h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  gap: 16px;
}

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

.cookie-option p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #9aa7b7;
}

.cookie-toggle {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  position: relative;
  border: none;
  cursor: pointer;
}

.cookie-toggle::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  left: 3px;
  top: 3px;
  transition: transform 0.2s ease-out;
}

.cookie-toggle.is-on {
  background: rgba(20, 184, 166, 0.7);
}

.cookie-toggle.is-on::after {
  transform: translateX(18px);
}

.cookie-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 999;
  display: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(7, 18, 26, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #dbeafe;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
