/* ============================================================
   ELO LIMPIEZA · Cookie Consent — Estilos
   Coherente con paleta sage / cream / copper
   ============================================================ */

#elo-cookie-banner,
#elo-cookie-modal {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  color: var(--carbon, #14181a);
  -webkit-font-smoothing: antialiased;
}

#elo-cookie-banner *,
#elo-cookie-modal * { box-sizing: border-box; }

/* ---------- BANNER FIJO INFERIOR ---------- */
#elo-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 30px);
  width: calc(100% - 32px);
  max-width: 1100px;
  background: var(--crema-claro, #faf6ec);
  border: 1px solid var(--verde-pastel, #dde5dd);
  border-radius: var(--r-lg, 20px);
  box-shadow: var(--sh-lg, 0 24px 60px rgba(31, 58, 47, 0.16));
  padding: 22px 28px;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
}

#elo-cookie-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#elo-cookie-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cobre, #b8924d), transparent);
  border-radius: 2px;
}

.elo-cc-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.elo-cc-text { flex: 1 1 320px; min-width: 0; }

.elo-cc-text h2 {
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--verde-botella, #1f3a2f);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.elo-cc-text p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--gris, #6a6e6c);
  margin: 0;
}

.elo-cc-text a {
  color: var(--cobre-oscuro, #8b6d2f);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

.elo-cc-text a:hover { color: var(--cobre, #b8924d); }

.elo-cc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ---------- BOTONES ---------- */
.elo-cc-btn {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.elo-cc-btn-primary {
  background: var(--verde-botella, #1f3a2f);
  color: var(--crema-claro, #faf6ec);
  border-color: var(--verde-botella, #1f3a2f);
}

.elo-cc-btn-primary:hover {
  background: var(--verde-profundo, #2d4a3e);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31, 58, 47, 0.18);
}

.elo-cc-btn-secondary {
  background: transparent;
  color: var(--verde-botella, #1f3a2f);
  border-color: var(--verde-salvia, #7d9788);
}

.elo-cc-btn-secondary:hover {
  background: var(--verde-pastel, #dde5dd);
  border-color: var(--verde-medio, #4a6b5c);
}

.elo-cc-btn-ghost {
  background: transparent;
  color: var(--gris, #6a6e6c);
  border-color: transparent;
  padding: 11px 14px;
}

.elo-cc-btn-ghost:hover {
  color: var(--verde-botella, #1f3a2f);
  background: var(--verde-pastel, #dde5dd);
}

/* ---------- MODAL DE PREFERENCIAS ---------- */
#elo-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

#elo-cookie-modal.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.elo-cc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 26, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.elo-cc-modal-box {
  position: relative;
  background: var(--crema-claro, #faf6ec);
  border-radius: var(--r-lg, 20px);
  width: calc(100% - 32px);
  max-width: 580px;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(20, 24, 26, 0.35);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#elo-cookie-modal.is-visible .elo-cc-modal-box { transform: scale(1); }

.elo-cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--verde-pastel, #dde5dd);
}

.elo-cc-modal-head h2 {
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--verde-botella, #1f3a2f);
  margin: 0;
  letter-spacing: -0.01em;
}

.elo-cc-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--gris, #6a6e6c);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.elo-cc-close:hover {
  background: var(--verde-pastel, #dde5dd);
  color: var(--verde-botella, #1f3a2f);
}

.elo-cc-modal-body {
  padding: 22px 28px;
  overflow-y: auto;
  flex: 1;
}

.elo-cc-modal-intro {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--gris, #6a6e6c);
  margin: 0 0 22px;
}

.elo-cc-category {
  padding: 18px 0;
  border-top: 1px solid var(--verde-pastel, #dde5dd);
}

.elo-cc-category:first-of-type { padding-top: 6px; border-top: none; }

.elo-cc-category-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.elo-cc-category-head h3 {
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--verde-botella, #1f3a2f);
  margin: 0 0 4px;
}

.elo-cc-category-head p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--gris, #6a6e6c);
  margin: 0;
  max-width: 360px;
}

/* ---------- TOGGLE / SWITCH ---------- */
.elo-cc-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 4px;
}

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

.elo-cc-slider {
  position: absolute;
  inset: 0;
  background: var(--gris-claro, #d6d8d4);
  border-radius: 999px;
  transition: background 0.25s ease;
  cursor: pointer;
}

.elo-cc-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.elo-cc-switch input:checked + .elo-cc-slider { background: var(--verde-medio, #4a6b5c); }
.elo-cc-switch input:checked + .elo-cc-slider::before { transform: translateX(20px); }
.elo-cc-switch input:disabled + .elo-cc-slider { opacity: 0.65; cursor: not-allowed; }

.elo-cc-modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 28px 22px;
  border-top: 1px solid var(--verde-pastel, #dde5dd);
  flex-wrap: wrap;
}

/* ---------- MÓVIL ---------- */
@media (max-width: 700px) {
  #elo-cookie-banner {
    bottom: 12px;
    width: calc(100% - 16px);
    padding: 18px 20px;
    border-radius: 16px;
  }
  .elo-cc-inner { gap: 16px; }
  .elo-cc-text h2 { font-size: 1.1rem; }
  .elo-cc-text p { font-size: 0.85rem; }
  .elo-cc-actions {
    width: 100%;
    justify-content: stretch;
  }
  .elo-cc-btn { flex: 1; padding: 12px 16px; font-size: 0.85rem; }
  .elo-cc-btn-ghost { flex: 0 0 auto; }
  .elo-cc-modal-box { border-radius: 16px; }
  .elo-cc-modal-head { padding: 18px 20px 14px; }
  .elo-cc-modal-head h2 { font-size: 1.2rem; }
  .elo-cc-modal-body { padding: 18px 20px; }
  .elo-cc-modal-foot { padding: 14px 20px 18px; }
  .elo-cc-category-head { flex-direction: column; gap: 12px; }
}

/* ---------- ACCESIBILIDAD ---------- */
.elo-cc-btn:focus-visible,
.elo-cc-close:focus-visible {
  outline: 2px solid var(--cobre, #b8924d);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #elo-cookie-banner,
  #elo-cookie-modal,
  .elo-cc-modal-box,
  .elo-cc-btn,
  .elo-cc-slider,
  .elo-cc-slider::before { transition: none; }
}
