/* ─── COOKIE CONSENT BANNER ─── */
.global-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  width: min(calc(100% - 32px), 1100px);
  background: rgba(19, 23, 34, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px 32px;
  z-index: 999;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.global-cookie-banner.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cookie-banner-container {
  position: relative;
  width: 100%;
}

.cookie-banner-close {
  position: absolute;
  top: -12px;
  right: -20px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.cookie-banner-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cookie-banner-text {
  flex: 1;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.cookie-banner-link {
  color: #c5a880;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed rgba(197, 168, 128, 0.4);
  transition: color 0.2s, border-color 0.2s;
}

.cookie-banner-link:hover {
  color: #e5c8a0;
  border-bottom-style: solid;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Cookie Buttons */
.cookie-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
}

.cookie-btn--primary {
  background: #c5a880;
  color: #090b0f;
}

.cookie-btn--primary:hover {
  background: #e5c8a0;
  transform: translateY(-1px);
}

.cookie-btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.cookie-btn--text {
  background: transparent;
  color: #94a3b8;
  padding: 12px 8px;
  text-decoration: underline;
}

.cookie-btn--text:hover {
  color: #ffffff;
}

/* ─── COOKIE MANAGEMENT MODAL ─── */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal {
  background: #ffffff;
  border-radius: 28px;
  padding: 40px 32px 32px 32px;
  width: 100%;
  max-width: 520px;
  position: relative;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal-overlay.active .cookie-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cookie-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.cookie-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cookie-modal-header {
  margin-bottom: 24px;
}

.cookie-modal-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--azul, #1c2545);
  line-height: 1.3;
}

.cookie-modal-body {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom Scrollbar for Modal Body */
.cookie-modal-body::-webkit-scrollbar {
  width: 6px;
}
.cookie-modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
.cookie-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.cookie-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Cookie Option Row */
.cookie-option-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 1px solid #f1f5f9;
  padding: 16px 0;
}

.cookie-option-row:first-of-type {
  padding-top: 0;
}

.cookie-option-row:last-of-type {
  border-bottom: none;
}

.cookie-option-info {
  flex: 1;
}

.cookie-option-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--azul, #1c2545);
  margin-bottom: 4px;
}

.cookie-option-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

/* Custom IOS Toggle Switch */
.cookie-option-switch {
  padding-top: 2px;
}

.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  border-radius: 24px;
  transition: background-color 0.2s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.switch-control input:checked + .switch-slider {
  background-color: #c5a880; /* Dourado */
}

.switch-control input:checked + .switch-slider:before {
  transform: translateX(20px);
}

.switch-control input:disabled + .switch-slider {
  background-color: #e2e8f0;
  opacity: 0.75;
  cursor: not-allowed;
}

.cookie-modal-notice {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin-top: 24px;
}

/* Footer of Cookie Modal */
.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
  border-top: 1px solid #f1f5f9;
  padding-top: 20px;
}

.cookie-modal-footer .cookie-btn {
  font-size: 14px;
  padding: 12px 24px;
}

.cookie-modal-footer .cookie-btn--secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.cookie-modal-footer .cookie-btn--secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Responsive banner & modal */
@media (max-width: 900px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  
  .cookie-banner-close {
    top: -12px;
    right: -12px;
  }
}

@media (max-width: 480px) {
  .global-cookie-banner {
    padding: 20px;
    bottom: 16px;
    width: calc(100% - 24px);
  }
  
  .cookie-banner-text {
    font-size: 13px;
  }
  
  .cookie-banner-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }
  
  .cookie-btn {
    width: 100%;
    text-align: center;
  }
  
  .cookie-btn--text {
    padding: 8px 0;
  }

  .cookie-modal {
    padding: 32px 20px 24px 20px;
    border-radius: 24px;
  }

  .cookie-modal-title {
    font-size: 19px;
  }

  .cookie-modal-close {
    top: 16px;
    right: 16px;
  }

  .cookie-modal-footer {
    flex-direction: column-reverse;
    gap: 10px;
  }
}
