/* Banner y panel de consentimiento de cookies (RGPD) */

:root {
  --eda-cookie-banner-h: 0px;
}

body.eda-cookie-banner-open {
  --eda-cookie-banner-h: 7.5rem;
}

body.eda-cookie-banner-open .eda-whatsapp-fab {
  bottom: calc(var(--eda-cookie-banner-h) + 1rem);
}

.eda-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9100;
  background: var(--eda-navy, #004365);
  color: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  padding: 1rem 0 1.15rem;
}

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

.eda-cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

/* Contenedor cuando la página no carga eda.css (p. ej. landings /promos) */
.eda-cookie-banner__inner.eda-container {
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.eda-cookie-banner__text {
  flex: 1 1 280px;
  max-width: 52rem;
}

.eda-cookie-banner__text h2 {
  margin: 0 0 0.35rem;
  font-family: var(--eda-font-heading, "Bree Serif", Georgia, serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.eda-cookie-banner__text p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  opacity: 0.95;
}

.eda-cookie-banner__text a {
  color: var(--eda-teal, #4ab7c3);
  text-decoration: underline;
}

.eda-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.eda-cookie-banner__btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  font-family: var(--eda-font-body, "Merriweather", Georgia, serif);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.55rem 0.95rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.eda-cookie-banner__btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.eda-cookie-banner__btn--primary {
  background: var(--eda-teal, #4ab7c3);
  border-color: var(--eda-teal, #4ab7c3);
  color: var(--eda-navy, #004365);
}

.eda-cookie-banner__btn--primary:hover {
  background: #5fc5d0;
  border-color: #5fc5d0;
}

.eda-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.eda-cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 35, 55, 0.55);
}

.eda-cookie-modal__panel {
  position: relative;
  width: min(100%, 34rem);
  max-height: min(90vh, 40rem);
  overflow: auto;
  background: #fff;
  color: var(--eda-text, #333);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  padding: 1.35rem 1.35rem 1.15rem;
}

.eda-cookie-modal__panel h2 {
  margin: 0 0 0.5rem;
  font-family: var(--eda-font-heading, "Bree Serif", Georgia, serif);
  font-size: 1.25rem;
  color: var(--eda-navy, #004365);
}

.eda-cookie-modal__intro {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.eda-cookie-modal__intro a {
  color: var(--eda-navy, #004365);
}

.eda-cookie-pref {
  border: 1px solid #e2e2e2;
  border-radius: 3px;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.65rem;
}

.eda-cookie-pref__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.eda-cookie-pref__head h3 {
  margin: 0;
  font-family: var(--eda-font-heading, "Bree Serif", Georgia, serif);
  font-size: 0.95rem;
  color: var(--eda-navy, #004365);
}

.eda-cookie-pref__head p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #555;
}

.eda-cookie-pref__toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--eda-navy, #004365);
}

.eda-cookie-pref__toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--eda-teal, #4ab7c3);
}

.eda-cookie-pref--locked .eda-cookie-pref__toggle {
  opacity: 0.65;
}

.eda-cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eee;
}

.eda-cookie-modal__btn {
  appearance: none;
  border: 1px solid var(--eda-navy, #004365);
  background: #fff;
  color: var(--eda-navy, #004365);
  font-family: var(--eda-font-body, "Merriweather", Georgia, serif);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  border-radius: 2px;
  cursor: pointer;
}

.eda-cookie-modal__btn--primary {
  background: var(--eda-teal, #4ab7c3);
  border-color: var(--eda-teal, #4ab7c3);
  color: var(--eda-navy, #004365);
}

.eda-cookie-fab {
  position: fixed;
  left: clamp(1rem, 3vw, 1.5rem);
  bottom: clamp(1rem, 3vw, 1.5rem);
  z-index: 9050;
  appearance: none;
  border: 0;
  background: var(--eda-navy, #004365);
  color: #fff;
  font-family: var(--eda-font-body, "Merriweather", Georgia, serif);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.eda-cookie-fab:hover {
  background: #005a7a;
}

.eda-consent-map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: #e8e8e8;
  color: #444;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.eda-consent-map-placeholder button {
  margin-top: 0.75rem;
  appearance: none;
  border: 0;
  background: var(--eda-teal, #4ab7c3);
  color: var(--eda-navy, #004365);
  font-family: var(--eda-font-body, "Merriweather", Georgia, serif);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: 2px;
  cursor: pointer;
}

@media (max-width: 640px) {
  body.eda-cookie-banner-open {
    --eda-cookie-banner-h: 11rem;
  }

  .eda-cookie-banner__actions {
    width: 100%;
  }

  .eda-cookie-banner__btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
