/**
 * @file consent.css
 * @description Banner y modal de preferencias de cookies (RGPD y Google Consent Mode v2)
 * @copyright 2026 Custom AI Solutions Lab SL. All Rights Reserved.
 */

.cookie-banner-wrapper {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: none;
  justify-content: center;
  pointer-events: none;
}

.cookie-banner-wrapper.is-visible { display: flex; }

.cookie-banner-card {
  pointer-events: auto;
  width: 100%;
  max-width: 640px;
  padding: 1.4rem 1.6rem;
  background: var(--rl-white);
  border: 1px solid var(--rl-light-gray);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  animation: cookie-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookie-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-title { margin-bottom: 0.5rem; font-size: 1.05rem; font-weight: 700; }

.cookie-text {
  margin-bottom: 1.1rem;
  font-size: var(--text-sm);
  line-height: 1.55;
}

.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cookie-btn { padding: 0.55rem 1.1rem; font-size: 0.82rem; }

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(4px);
}

.cookie-modal-backdrop.is-active { display: flex; }

.cookie-modal-dialog {
  width: 100%;
  max-width: 540px;
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  padding: 1.75rem;
  background: var(--rl-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

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

.cookie-modal-header h2 { font-size: 1.2rem; }

.cookie-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rl-light-gray);
}

.cookie-pref-row input { width: 20px; height: 20px; accent-color: var(--rl-carbon); }
.pref-title { font-size: 0.92rem; font-weight: 600; }
.pref-desc { font-size: var(--text-sm); color: var(--rl-carbon-muted); }

.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

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