/**
 * Estilos do banner de cookies (LGPD) e da caixa de consentimento dos
 * formulários. Usa as mesmas variáveis de cor/fonte do style.css do site
 * (--gold, --dark, --cream etc.), então este arquivo deve ser carregado
 * DEPOIS do style.css.
 */

/* ===== Banner de cookies ===== */
.rl-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--dark, #201B14);
  color: #fff;
  padding: 1.25rem 1rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.rl-cookie-banner--visible {
  transform: translateY(0);
}

.rl-cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  justify-content: space-between;
}

.rl-cookie-banner__text {
  flex: 1 1 420px;
  margin: 0;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.9rem;
  line-height: 1.55;
  color: #f2ede3;
}

.rl-cookie-banner__text a {
  color: var(--gold-light, #C9AD78);
  text-decoration: underline;
}

.rl-cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.rl-cookie-btn {
  font-family: var(--font-sans, sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 4px;
  padding: 0.65rem 1.3rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.rl-cookie-btn--primary {
  background: var(--gold, #A9884D);
  color: #fff;
}

.rl-cookie-btn--primary:hover {
  background: var(--gold-light, #C9AD78);
}

.rl-cookie-btn--outline {
  background: transparent;
  color: #f2ede3;
  border-color: rgba(255, 255, 255, 0.35);
}

.rl-cookie-btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .rl-cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .rl-cookie-banner__actions {
    justify-content: stretch;
  }

  .rl-cookie-btn {
    flex: 1;
  }
}

/* ===== Link "Preferências de cookies" (ex.: no rodapé) ===== */
.rl-cookie-prefs-link {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
}

/* ===== Links legais no rodapé do site ===== */
.footer__legal {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  font-family: var(--font-sans, sans-serif);
}

.footer__legal a,
.footer__legal .rl-cookie-prefs-link {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.footer__legal a:hover,
.footer__legal .rl-cookie-prefs-link:hover {
  color: var(--gold-light, #C9AD78);
  text-decoration: underline;
}

.footer__legal-sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.78rem;
}

/* ===== Caixa de consentimento nos formulários ===== */
.form-group--consent {
  margin-top: 0.5rem;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-family: var(--font-sans, sans-serif);
}

.consent-check input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--gold, #A9884D);
  cursor: pointer;
}

.consent-check span {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted, #6B6259);
}

.consent-check a {
  color: var(--gold, #A9884D);
  text-decoration: underline;
}

.consent-check input.error + span {
  color: #b3261e;
}

/* Destaque vermelho quando o envio é tentado sem marcar o aceite */
.consent-check input.error {
  outline: 2px solid #b3261e;
  outline-offset: 3px;
  border-radius: 3px;
  animation: rl-consent-shake 0.4s ease;
}

.form-group--consent:has(input.error) {
  border-left: 3px solid #b3261e;
  padding: 0.6rem 0.75rem;
  margin-left: -0.75rem;
  background: rgba(179, 38, 30, 0.06);
  border-radius: 0 6px 6px 0;
}

@keyframes rl-consent-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

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