/**
 * Banner y modal de cookies — usado en la home estática (index.html) sin cargar app.css completo.
 * Mantener alineado con assets/css/app.css (.cookie-banner / .cookie-prefs).
 */
:root {
  --pt-cc-bg: rgba(10, 10, 10, 0.96);
  --pt-cc-line: rgba(110, 255, 203, 0.22);
  --pt-cc-muted: rgba(245, 245, 245, 0.65);
  --pt-cc-ink: #f5f5f5;
  --pt-cc-accent: #6effcb;
  --pt-cc-panel: rgba(18, 22, 30, 0.98);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2147483000;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
  background: var(--pt-cc-bg);
  border-top: 1px solid var(--pt-cc-line);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner__inner--rgpd {
  align-items: center;
}

.cookie-banner__copy {
  flex: 1;
  min-width: min(100%, 260px);
}

.cookie-banner__text {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--pt-cc-muted);
}

.cookie-banner__text strong {
  color: var(--pt-cc-ink);
  font-weight: 600;
}

.cookie-banner__links {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.cookie-banner__links a {
  color: var(--pt-cc-accent);
  text-decoration: none;
}

.cookie-banner__links a:hover {
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.pt-cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pt-cc-btn--primary {
  background: var(--pt-cc-accent);
  color: #0a0a0a;
  border-color: rgba(0, 0, 0, 0.06);
}

.pt-cc-btn--primary:hover {
  filter: brightness(1.05);
}

.pt-cc-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--pt-cc-ink);
  border-color: rgba(255, 255, 255, 0.12);
}

.pt-cc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.pt-cc-btn:focus-visible {
  outline: 2px solid var(--pt-cc-accent);
  outline-offset: 2px;
}

.cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.cookie-prefs[hidden] {
  display: none !important;
}

.cookie-prefs__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.cookie-prefs__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: 22px 22px 20px;
  border-radius: 16px;
  background: var(--pt-cc-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.cookie-prefs__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cookie-prefs__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pt-cc-ink);
  letter-spacing: -0.02em;
}

.cookie-prefs__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: -6px -6px 0 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--pt-cc-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cookie-prefs__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cookie-prefs__intro {
  margin: 0 0 16px;
  color: var(--pt-cc-muted);
  font-size: 12px;
  line-height: 1.45;
}

.muted {
  color: var(--pt-cc-muted);
}

.small {
  font-size: 12px;
}

.cookie-prefs__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cookie-prefs__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-prefs__row:first-of-type {
  padding-top: 4px;
}

.cookie-prefs__row strong {
  display: block;
  font-size: 14px;
  color: var(--pt-cc-ink);
}

.cookie-prefs__row .muted {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--pt-cc-muted);
  line-height: 1.45;
}

.cookie-prefs__lock {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(110, 255, 203, 0.85);
}

.cookie-prefs__switch input {
  width: 44px;
  height: 24px;
  accent-color: var(--pt-cc-accent);
  cursor: pointer;
}

.cookie-prefs__foot {
  margin-top: 18px;
}

.cookie-prefs__foot .muted {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
}

.cookie-prefs__foot a {
  color: var(--pt-cc-accent);
}

body.cookie-prefs-open {
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .cookie-banner__actions {
    width: 100%;
    justify-content: stretch;
  }

  .cookie-banner__actions .pt-cc-btn {
    flex: 1;
    min-width: 0;
  }
}
