/**
 * Banner de Consentimento LGPD (Consent Mode v2) — Alex Faria
 * Arquitetura PANOPTES v1.0.0
 * Paleta refinada: Dark luxo, dourado metálico e tipografia Poppins.
 */

.af-consent-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: 24px;
  max-width: 520px;
  margin-left: auto;
  z-index: 99999;
  background: rgba(14, 14, 16, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(212, 175, 55, 0.08);
  color: #f5f5f7;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.af-consent-banner.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.af-consent-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.af-consent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #aa820a);
  color: #0b0b0d;
  font-size: 13px;
  font-weight: 700;
}

.af-consent-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f7eed2;
}

.af-consent-desc {
  margin: 0 0 16px 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #b3b3b8;
}

.af-consent-desc a {
  color: #d4af37;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.af-consent-desc a:hover {
  color: #fff;
}

.af-consent-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.af-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  outline: none;
}

.af-consent-btn--accept {
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
  color: #09090b;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
  flex: 1 1 auto;
}

.af-consent-btn--accept:hover {
  background: linear-gradient(135deg, #e5c158 0%, #bd9315 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}

.af-consent-btn--reject {
  background: rgba(255, 255, 255, 0.07);
  color: #d1d1d6;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.af-consent-btn--reject:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.af-consent-btn--settings {
  background: transparent;
  color: #9e9ea3;
  padding: 8px 12px;
  text-decoration: underline;
  font-size: 0.78rem;
}

.af-consent-btn--settings:hover {
  color: #d4af37;
}

/* Modal de Preferências Detalhadas */
.af-consent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.af-consent-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.af-consent-modal {
  width: 100%;
  max-width: 480px;
  background: #121215;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  padding: 24px;
  color: #f5f5f7;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.af-consent-modal-title {
  margin: 0 0 14px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f7eed2;
}

.af-consent-modal-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.af-consent-modal-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.af-consent-modal-item h4 {
  margin: 0 0 4px 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: #eee;
}

.af-consent-modal-item p {
  margin: 0;
  font-size: 0.76rem;
  color: #9a9aa0;
  line-height: 1.4;
}

.af-consent-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.af-consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.af-consent-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 24px;
}

.af-consent-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.af-consent-toggle input:checked + .af-consent-slider {
  background-color: #d4af37;
}

.af-consent-toggle input:disabled + .af-consent-slider {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.6;
}

.af-consent-toggle input:checked + .af-consent-slider:before {
  transform: translateX(18px);
}

@media (max-width: 600px) {
  .af-consent-banner {
    bottom: 12px;
    right: 12px;
    left: 12px;
    padding: 18px;
  }
}
