/* Aviso de cookies (partials/consentimiento.php). Tarjeta fija, no bloquea la página.
   Usa los tokens y los componentes de Marmo UI (.btn, .switch-wrapper). */
.consent {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1500;
  width: min(27.5rem, calc(100vw - 2.5rem));
  max-height: calc(100vh - 2.5rem);
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--marmo-white);
  color: var(--marmo-text);
  border: 1px solid var(--marmo-line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(4, 26, 51, 0.22);
  animation: consent-entra 0.28s ease-out both;
}
.consent[hidden] { display: none; }

.consent__titulo {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--marmo-ink);
}
.consent__texto {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.consent__texto a {
  color: var(--marmo-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.consent__opciones {
  display: grid;
  gap: 0.875rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--marmo-line);
}
.consent__opciones[hidden] { display: none; }
.consent__opcion {
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.5;
}
.consent__opcion strong {
  display: block;
  color: var(--marmo-ink);
  font-weight: 600;
}

.consent__acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
  margin-top: 1.25rem;
}
.consent__acciones [hidden] { display: none; }
.consent__acciones .btn { min-height: 44px; }
.consent__configurar { margin-right: auto; padding-left: 0; }

.consent :focus-visible {
  outline: 2px solid var(--marmo-blue);
  outline-offset: 2px;
}

@keyframes consent-entra {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .consent {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 85vh;
    max-height: 85dvh;
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    border-width: 1px 0 0;
  }
  .consent__acciones { justify-content: stretch; }
  .consent__acciones .btn-outline,
  .consent__acciones .btn-primary { flex: 1 1 0; }
  .consent__configurar { flex: 1 0 100%; order: 3; margin: 0; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}
