/**
 * Cookie Consent Lite - La Floristería Miriam Franco
 *
 * Objetivo:
 * - Banner propio, ligero y sin dependencias externas.
 * - Consentimiento claro para analíticas: aceptar, rechazar y gestionar.
 * - Desktop/tablet: barra premium compacta, inspirada en avisos discretos.
 * - Mobile: bottom sheet compacto, legible y táctil.
 * - No carga analíticas hasta consentimiento explícito.
 */

/* ============================================================
   Estado oculto
   ============================================================ */

.lf-cookie[hidden],
.lf-cookie [hidden] {
  display: none !important;
}

/* ============================================================
   Wrapper principal
   ============================================================ */

.lf-cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 99999;

  color: #FFFFFF;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
   Shell principal
   ============================================================ */

.lf-cookie__shell {
  width: 100%;
  max-height: 56vh;
  margin: 0 auto;
  padding: 12px;

  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;

  overflow: auto;
  background: rgba(17, 17, 17, 0.98);
  border: 1px solid rgba(198, 161, 91, 0.34);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

.lf-cookie__content {
  min-width: 0;
}

/* ============================================================
   Tipografía
   ============================================================ */

.lf-cookie__eyebrow {
  margin: 0 0 4px;
  color: #C6A15B;

  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lf-cookie__title {
  margin: 0 0 5px;
  color: #FFFFFF;

  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.96rem;
  line-height: 1.14;
  font-weight: 600;
}

.lf-cookie__text,
.lf-cookie__legal {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);

  font-size: 0.69rem;
  line-height: 1.42;
}

.lf-cookie__legal {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.62);

  font-size: 0.63rem;
  line-height: 1.38;
}

.lf-cookie__legal a {
  color: #C6A15B;
  text-decoration: none;
}

.lf-cookie__legal a:hover {
  color: #FFFFFF;
  text-decoration: none;
}

/* ============================================================
   Preferencias
   ============================================================ */

.lf-cookie__preferences {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.lf-cookie__option {
  min-height: 42px;
  padding: 8px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.lf-cookie__option strong,
.lf-cookie__option span {
  display: block;
}

.lf-cookie__option strong {
  margin-bottom: 2px;
  color: #FFFFFF;

  font-size: 0.68rem;
  line-height: 1.25;
}

.lf-cookie__option span span {
  color: rgba(255, 255, 255, 0.66);

  font-size: 0.6rem;
  line-height: 1.35;
}

.lf-cookie__badge {
  flex: 0 0 auto;
  padding: 5px 8px;

  color: #111111;
  background: #C6A15B;
  border-radius: 999px;

  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ============================================================
   Toggle
   ============================================================ */

.lf-cookie__toggle {
  position: relative;
  flex: 0 0 auto;

  width: 40px;
  height: 22px;

  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.lf-cookie__toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;

  width: 16px;
  height: 16px;

  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 180ms ease;
}

.lf-cookie__toggle:checked {
  border-color: #C6A15B;
  background: #C6A15B;
}

.lf-cookie__toggle:checked::before {
  transform: translateX(17px);
  background: #111111;
}

/* ============================================================
   Botones
   ============================================================ */

.lf-cookie__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.lf-cookie__button {
  min-height: 36px;
  padding: 8px 10px;

  border-radius: 999px;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.1;

  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.lf-cookie__button:hover {
  transform: translateY(-1px);
}

.lf-cookie__button--primary {
  color: #111111;
  border: 1px solid #C6A15B;
  background: #C6A15B;
}

.lf-cookie__button--primary:hover {
  color: #111111;
  border-color: #B08E4F;
  background: #B08E4F;
}

.lf-cookie__button--ghost {
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
}

.lf-cookie__button--ghost:hover {
  color: #FFFFFF;
  border-color: rgba(198, 161, 91, 0.8);
  background: rgba(198, 161, 91, 0.10);
}

/* ============================================================
   Accesibilidad
   ============================================================ */

.lf-cookie__button:focus {
  outline: none;
}

.lf-cookie__button:focus-visible,
.lf-cookie__toggle:focus-visible,
.lf-cookie__legal a:focus-visible {
  outline: 2px solid rgba(198, 161, 91, 0.62);
  outline-offset: 3px;
}

/* ============================================================
   Mobile pequeño
   ============================================================ */

@media (max-width: 380px) {
  .lf-cookie {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .lf-cookie__shell {
    max-height: 54vh;
    padding: 11px;
  }

  .lf-cookie__title {
    font-size: 0.9rem;
  }

  .lf-cookie__text {
    font-size: 0.62rem;
  }

  .lf-cookie__button {
    min-height: 34px;
    font-size: 0.64rem;
  }
}

/* ============================================================
   Tablet y desktop: barra inferior premium
   ============================================================ */

@media (min-width: 768px) {
  .lf-cookie {
    left: 24px;
    right: 24px;
    bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .lf-cookie__shell {
    width: min(100%, 980px);
    max-height: none;
    padding: 14px 16px;

    grid-template-columns: minmax(0, 1fr) 210px;
    align-items: center;
    gap: 18px;

    overflow: visible;
    border-radius: 12px;
    border-color: rgba(198, 161, 91, 0.28);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.32);
  }

  .lf-cookie__eyebrow {
    margin-bottom: 4px;
    font-size: 0.56rem;
  }

  .lf-cookie__title {
    margin-bottom: 4px;
    font-size: 1rem;
  }

  .lf-cookie__text {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .lf-cookie__legal {
    margin-top: 4px;
    font-size: 0.62rem;
    line-height: 1.35;
  }

  .lf-cookie__actions {
    width: 210px;
    gap: 6px;
  }

  .lf-cookie__button {
    min-height: 32px;
    padding: 7px 12px;
    font-size: 0.68rem;
  }

  .lf-cookie__preferences {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
  }
}

/* ============================================================
   Desktop amplio: acciones en fila
   ============================================================ */

@media (min-width: 1100px) {
  .lf-cookie__shell {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .lf-cookie__actions {
    width: auto;
    grid-template-columns: auto auto auto;
    align-items: center;
  }

  .lf-cookie__button {
    min-width: 132px;
    white-space: nowrap;
  }
}

/* ============================================================
   Footer - Preferencias de Cookies
   ============================================================ */

.ddvs-footer__cookie-preferences,
.ddvs-footer__cookie-preferences:hover,
.ddvs-footer__cookie-preferences:active,
.ddvs-footer__cookie-preferences:visited {
  text-decoration: none !important;
}

.ddvs-footer__cookie-preferences:hover {
  color: #FFFFFF;
}

.ddvs-footer__cookie-preferences:focus {
  outline: none;
}

.ddvs-footer__cookie-preferences:focus-visible {
  outline: 2px solid #C6A15B;
  outline-offset: 3px;
  border-radius: 4px;
}
