/**
 * DESTINO SALENTO — ESTILOS DE GESTIÓN DE COOKIES Y PRIVACIDAD (css/cookies.css)
 * Banner rectangular inferior de consentimiento y modal de preferencias granulares.
 * Compatible con Google Consent Mode v2, Ley 1581 de 2012 (Habeas Data) y RGPD.
 */

/* ==========================================================================
   1. BANNER RECTANGULAR INFERIOR DE CONSENTIMIENTO
   ========================================================================== */
.salento-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: rgba(14, 17, 22, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 219, 88, 0.28);
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-radius: 0; /* Formato rectangular estricto */
  box-shadow: 0 -12px 44px rgba(0, 0, 0, 0.65), 0 -1px 0 rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  padding: 1.15rem 2rem;
  z-index: 999999;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Línea sutil superior de acento editorial (Oro Salento + Azul Andino) */
.salento-cookie-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 219, 88, 0) 0%, rgba(255, 219, 88, 0.9) 25%, #0F52BA 75%, rgba(15, 82, 186, 0) 100%);
  pointer-events: none;
}

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

/* Contenedor interior de máxima amplitud editorial */
.salento-cookie-banner-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

/* Bloque informativo de texto */
.cookie-banner-info {
  flex: 1 1 auto;
  max-width: 880px;
}

.cookie-banner-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.cookie-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #FFDB58;
  background: rgba(255, 219, 88, 0.12);
  border: 1px solid rgba(255, 219, 88, 0.28);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.cookie-tag-icon {
  flex-shrink: 0;
}

.cookie-banner-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.25;
}

.cookie-banner-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.cookie-banner-text strong {
  color: #FFFFFF;
  font-weight: 600;
}

.cookie-banner-link {
  color: #FFDB58;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.45rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.cookie-banner-link:hover {
  color: #FFE685;
}

.cookie-banner-link .link-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.cookie-banner-link:hover .link-arrow {
  transform: translate(2px, -2px);
}

/* Bloque horizontal de botones de acción */
.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Botón base */
.cookie-btn {
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.cookie-btn:active {
  transform: scale(0.98);
}

.cookie-btn:focus-visible {
  outline: 2px solid #FFDB58;
  outline-offset: 2px;
}

/* Botón Aceptar todas (CTA Principal) */
.cookie-btn-accept {
  background: #0F52BA;
  color: #FFFFFF;
  border-color: #0F52BA;
  box-shadow: 0 4px 14px rgba(15, 82, 186, 0.35);
}

.cookie-btn-accept:hover {
  background: #1562DC;
  border-color: #1562DC;
  box-shadow: 0 6px 20px rgba(15, 82, 186, 0.5);
  transform: translateY(-1px);
}

/* Botón Solo necesarias (Secundario sutil) */
.cookie-btn-reject {
  background: rgba(255, 255, 255, 0.07);
  color: #E2E8F0;
  border-color: rgba(255, 255, 255, 0.18);
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Botón Configurar (Terciario / Ghost con icono) */
.cookie-btn-settings {
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.22);
}

.cookie-btn-settings:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.cookie-btn-settings svg {
  color: #FFDB58;
  opacity: 0.85;
  transition: transform 0.25s ease;
}

.cookie-btn-settings:hover svg {
  transform: rotate(45deg);
  opacity: 1;
}

/* ==========================================================================
   2. MODAL DE PREFERENCIAS GRANULARES
   ========================================================================== */
.salento-cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.salento-cookie-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.salento-cookie-modal-card {
  background: #0E1116;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  color: #FFFFFF;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 219, 88, 0.12);
  position: relative;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.salento-cookie-modal-backdrop.is-open .salento-cookie-modal-card {
  transform: scale(1) translateY(0);
}

.cookie-modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.cookie-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg);
}

.cookie-modal-title {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 0.75rem 0;
  padding-right: 2.5rem;
  letter-spacing: -0.01em;
}

.cookie-modal-intro {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1.5rem 0;
}

.cookie-modal-intro strong {
  color: #FFDB58;
}

.cookie-group-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cookie-group-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.cookie-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.cookie-group-name {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.cookie-badge-required {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #FFDB58;
  background: rgba(255, 219, 88, 0.12);
  border: 1px solid rgba(255, 219, 88, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

.cookie-group-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

/* Toggle Switch Interactivo */
.cookie-toggle-label {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.cookie-toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.16);
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background-color 0.22s ease, border-color 0.22s ease;
}

.cookie-toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

.cookie-toggle-input:checked + .cookie-toggle-slider {
  background-color: #0F52BA;
  border-color: #0F52BA;
}

.cookie-toggle-input:checked + .cookie-toggle-slider::before {
  transform: translateX(22px);
}

.cookie-toggle-input:focus-visible + .cookie-toggle-slider {
  outline: 2px solid #FFDB58;
  outline-offset: 2px;
}

.cookie-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}

.cookie-btn-save {
  background: #0F52BA;
  color: #FFFFFF;
  border-color: #0F52BA;
  box-shadow: 0 4px 14px rgba(15, 82, 186, 0.35);
}

.cookie-btn-save:hover {
  background: #1562DC;
  border-color: #1562DC;
  box-shadow: 0 6px 20px rgba(15, 82, 186, 0.5);
  transform: translateY(-1px);
}

/* ==========================================================================
   3. ENLACE Y BOTÓN DE COOKIES EN FOOTER
   ========================================================================== */
.footer-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.footer-legal-link {
  color: #94A3B8;
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: #FFDB58;
  text-decoration: underline;
}

.footer-legal-sep {
  color: rgba(148, 163, 184, 0.4);
  font-size: 0.75rem;
}

.footer-legal-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: #94A3B8;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal-btn:hover {
  color: #FFDB58;
  text-decoration: underline;
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS (LAYOUT RECTANGULAR INFERIOR)
   ========================================================================== */
@media (max-width: 1024px) {
  .salento-cookie-banner-inner {
    gap: 1.5rem;
  }

  .salento-cookie-banner {
    padding: 1.15rem 1.5rem;
  }
}

@media (max-width: 880px) {
  .salento-cookie-banner {
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .salento-cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.15rem;
  }

  .cookie-banner-info {
    max-width: 100%;
  }

  .cookie-banner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    width: 100%;
  }

  .cookie-btn {
    width: 100%;
  }

  .cookie-btn-settings {
    grid-column: 1 / -1;
    order: 3;
  }

  .cookie-btn-reject {
    order: 1;
  }

  .cookie-btn-accept {
    order: 2;
  }
}

@media (max-width: 480px) {
  .salento-cookie-banner {
    padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  }

  .cookie-banner-title {
    font-size: 0.98rem;
  }

  .cookie-banner-text {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .cookie-banner-actions {
    grid-template-columns: 1fr;
  }

  .cookie-btn-settings {
    order: 3;
  }

  .cookie-btn-reject {
    order: 2;
  }

  .cookie-btn-accept {
    order: 1;
  }

  .cookie-modal-footer {
    flex-direction: column;
    width: 100%;
  }

  .cookie-modal-footer .cookie-btn {
    width: 100%;
  }
}
