/* ============================================================
   AhorroSmart — Cookie Banner CSS
   Adapta las variables de color a las tuyas si es necesario
   ============================================================ */

:root {
  --cb-accent:      #16a34a;   /* verde AhorroSmart */
  --cb-accent-dark: #15803d;
  --cb-bg:          #ffffff;
  --cb-border:      #e5e7eb;
  --cb-text:        #111827;
  --cb-muted:       #6b7280;
  --cb-shadow:      0 -2px 20px rgba(0,0,0,.10), 0 -1px 6px rgba(0,0,0,.06);
  --cb-radius:      14px;
  --cb-z:           9999;
}

/* ── Contenedor principal ───────────────────────────────────── */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--cb-z);
  background: var(--cb-bg);
  border-top: 1px solid var(--cb-border);
  box-shadow: var(--cb-shadow);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  font-family: inherit;   /* usa la fuente de tu web */
  font-size: 14px;
  line-height: 1.5;
  color: var(--cb-text);
}

#cookie-banner.cb-visible {
  transform: translateY(0);
}

#cookie-banner.cb-hidden {
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}

/* ── Inner ──────────────────────────────────────────────────── */

.cb-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 20px 16px;
}

/* ── Cabecera: icono + texto ────────────────────────────────── */

.cb-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.cb-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.cb-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.cb-text p {
  margin: 0 0 6px;
  color: var(--cb-muted);
  font-size: 13px;
}

.cb-link {
  color: var(--cb-accent);
  font-size: 13px;
  text-decoration: underline;
}

/* ── Panel de toggles ───────────────────────────────────────── */

.cb-toggles {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: #f9fafb;
  border: 1px solid var(--cb-border);
  border-radius: 10px;
}

.cb-toggles.cb-open {
  display: flex;
}

/* ── Toggle individual ──────────────────────────────────────── */

.cb-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.cb-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider estilo iOS */
.cb-slider {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  background: #d1d5db;
  border-radius: 11px;
  transition: background .2s;
  cursor: pointer;
}

.cb-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}

.cb-toggle input:checked ~ .cb-slider {
  background: var(--cb-accent);
}

.cb-toggle input:checked ~ .cb-slider::after {
  transform: translateX(18px);
}

.cb-toggle input:disabled ~ .cb-slider {
  opacity: .5;
  cursor: not-allowed;
}

.cb-label {
  flex: 1;
}

.cb-label strong {
  display: block;
  font-size: 13px;
}

.cb-label small {
  color: var(--cb-muted);
  font-size: 12px;
}

/* ── Botones ────────────────────────────────────────────────── */

.cb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cb-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}

.cb-btn--primary {
  background: var(--cb-accent);
  color: #fff;
  border-color: var(--cb-accent);
}

.cb-btn--primary:hover {
  background: var(--cb-accent-dark);
  border-color: var(--cb-accent-dark);
}

.cb-btn--outline {
  background: transparent;
  color: var(--cb-accent);
  border-color: var(--cb-accent);
}

.cb-btn--outline:hover {
  background: #f0fdf4;
}

.cb-btn--ghost {
  background: transparent;
  color: var(--cb-muted);
  border-color: var(--cb-border);
}

.cb-btn--ghost:hover {
  background: #f3f4f6;
  color: var(--cb-text);
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 600px) {
  .cb-inner {
    padding: 14px 14px 12px;
  }

  .cb-actions {
    flex-direction: column-reverse;
  }

  .cb-btn {
    width: 100%;
    text-align: center;
    padding: 10px;
  }

  .cb-text p {
    font-size: 12px;
  }
}