/* Banner y Gestión de Cookies — estásvivo.site */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 540px;
  margin: 0 auto;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.12), 0 0 25px rgba(16, 185, 129, 0.15);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  pointer-events: none;
}

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

.cookie-banner:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary, #059669), transparent);
  border-radius: 12px 12px 0 0;
}

.cookie-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cookie-icon {
  width: 20px;
  height: 20px;
  color: var(--primary, #059669);
  flex-shrink: 0;
}

.cookie-title {
  font-family: "Fraunces", serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  margin: 0;
}

.cookie-text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-dim, #475569);
  margin: 0 0 18px;
}

.cookie-text a {
  color: var(--primary, #059669);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.cookie-text a:hover {
  opacity: 0.85;
}

/* Acciones principales */
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cookie-btn {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.cookie-btn-primary {
  background: linear-gradient(180deg, var(--primary-bright, #10b981), var(--primary, #059669));
  color: #fff;
  border: 1px solid rgba(5, 150, 105, 0.4);
  flex: 1;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.cookie-btn-primary:hover {
  background: linear-gradient(180deg, #34d399, #059669);
  transform: translateY(-1px);
}

.cookie-btn-secondary {
  background: #f8fafc;
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #e2e8f0);
  flex: 1;
  min-width: 120px;
}

.cookie-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.cookie-btn-link {
  background: none;
  border: none;
  color: var(--text-dim, #64748b);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 6px 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-btn-link:hover {
  color: var(--text, #0f172a);
}

/* Panel de configuración interactiva */
.cookie-config-panel {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #e2e8f0);
  animation: fadeIn 0.25s ease;
}

.cookie-config-panel.open {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.cookie-option-info {
  flex: 1;
}

.cookie-option-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cookie-option-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 4px;
  color: var(--primary, #059669);
  font-weight: 600;
}

.cookie-option-desc {
  font-size: 0.78rem;
  color: var(--text-dim, #64748b);
  line-height: 1.45;
  margin: 0;
}

/* Interruptores (Switch) */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 24px;
  transition: 0.25s;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  border-radius: 50%;
  transition: 0.25s;
}

.cookie-switch input:checked + .cookie-slider {
  background-color: var(--primary, #059669);
  border-color: var(--primary, #059669);
}

.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(16px);
  background-color: #fff;
}

.cookie-switch input:disabled + .cookie-slider {
  cursor: not-allowed;
  opacity: 0.65;
}

@media (max-width: 600px) {
  .cookie-banner {
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 20px 18px;
  }
  .cookie-actions {
    flex-direction: column;
  }
  .cookie-btn-primary, .cookie-btn-secondary {
    width: 100%;
  }
}
