/* =====================================
   PANEL DE COOKIES
===================================== */

.cookie-panel {
  --cookie-bg-dark: rgba(24, 15, 10, 0.98);
  --cookie-bg-light: #fff7f2;
  --cookie-text-dark: #fff4ed;
  --cookie-text-light: #1f130d;
  --cookie-muted-dark: rgba(255, 244, 237, 0.66);
  --cookie-muted-light: rgba(31, 19, 13, 0.62);
  --cookie-accent-1: #f97316;
  --cookie-accent-2: #ea580c;
  --cookie-dot-dark: rgba(251, 146, 60, 0.95);
  --cookie-dot-light: rgba(234, 88, 12, 0.9);

  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 9999;

  width: 320px;
  max-width: calc(100% - 2rem);
  box-sizing: border-box;
  overflow: hidden;

  padding: 1.1rem 1.2rem 1.1rem;
  border-radius: 16px;

  background:
    radial-gradient(circle at 0% 0%, rgba(249, 115, 22, 0.22), transparent 60%),
    var(--cookie-bg-dark);

  color: var(--cookie-text-dark);

  font-size: 0.82rem;
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(251, 146, 60, 0.16);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.cookie-panel.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Cinta de puntitos superior */
.cookie-panel::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 1.2rem;
  right: 1.2rem;
  height: 3px;
  pointer-events: none;
  opacity: 0.9;

  background-image: radial-gradient(
    circle,
    var(--cookie-dot-dark) 0,
    var(--cookie-dot-dark) 45%,
    transparent 50%
  );
  background-size: 14px 3px;
  background-repeat: repeat-x;

  animation: cookie-dots-move 2.4s linear infinite;
}

/* =========================
   HEADER
========================= */

.cookie-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.cookie-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cookie-text-dark);
}

/* =========================
   BOTÓN CERRAR
========================= */

.cookie-close {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--cookie-muted-dark);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.cookie-close:hover {
  color: var(--cookie-text-dark);
  transform: scale(1.05);
}

/* =========================
   TEXTO
========================= */

.cookie-text {
  margin: 0 0 0.7rem;
  line-height: 1.45;
  color: var(--cookie-muted-dark);
}

/* =========================
   FOOTER / BOTONES
========================= */

.cookie-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cookie-btn {
  border: 0;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

/* Botón principal */
.cookie-btn-primary {
  padding: 0.4rem 1.3rem;
  font-weight: 600;
  color: #fffaf7;
  background: linear-gradient(135deg, var(--cookie-accent-1), var(--cookie-accent-2));
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.32);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.cookie-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.42);
  filter: brightness(1.05);
}

/* Botón secundario tipo link */
.cookie-btn-link {
  padding: 0.35rem 0.7rem 0.35rem 0;
  background: transparent;
  color: var(--cookie-muted-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-btn-link:hover {
  color: var(--cookie-text-dark);
}

/* =========================
   TEMA CLARO
========================= */

.neu-root.theme-light .cookie-panel,
html[data-theme="light"] .cookie-panel,
body.theme-light .cookie-panel {
  background:
    radial-gradient(circle at 0% 0%, rgba(249, 115, 22, 0.14), transparent 60%),
    var(--cookie-bg-light);

  color: var(--cookie-text-light);

  box-shadow:
    0 18px 40px rgba(45, 24, 10, 0.14),
    0 0 0 1px rgba(234, 88, 12, 0.12);
}

.neu-root.theme-light .cookie-panel::before,
html[data-theme="light"] .cookie-panel::before,
body.theme-light .cookie-panel::before {
  background-image: radial-gradient(
    circle,
    var(--cookie-dot-light) 0,
    var(--cookie-dot-light) 45%,
    transparent 50%
  );
}

.neu-root.theme-light .cookie-title,
html[data-theme="light"] .cookie-title,
body.theme-light .cookie-title {
  color: var(--cookie-text-light);
}

.neu-root.theme-light .cookie-close,
html[data-theme="light"] .cookie-close,
body.theme-light .cookie-close {
  color: var(--cookie-muted-light);
}

.neu-root.theme-light .cookie-close:hover,
html[data-theme="light"] .cookie-close:hover,
body.theme-light .cookie-close:hover {
  color: var(--cookie-text-light);
}

.neu-root.theme-light .cookie-text,
html[data-theme="light"] .cookie-text,
body.theme-light .cookie-text {
  color: var(--cookie-muted-light);
}

.neu-root.theme-light .cookie-btn-link,
html[data-theme="light"] .cookie-btn-link,
body.theme-light .cookie-btn-link {
  color: var(--cookie-muted-light);
}

.neu-root.theme-light .cookie-btn-link:hover,
html[data-theme="light"] .cookie-btn-link:hover,
body.theme-light .cookie-btn-link:hover {
  color: var(--cookie-text-light);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 576px) {
  .cookie-panel {
    right: 1rem;
    bottom: 1rem;
    width: calc(100% - 2rem);
    border-radius: 14px;
  }
}

/* =========================
   ANIMACIONES
========================= */

@keyframes cookie-dots-move {
  from {
    background-position-x: 0;
  }
  to {
    background-position-x: 14px;
  }
}