/* ==========================================================================
   BOSQUES DE QUILENTUE - COOKIES, PRIVACY & DATA COMPLIANCE STYLES
   Cumplimiento integral Nueva Ley de Protección de Datos Personales (Chile)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COOKIE CONSENT BANNER (FLOTANTE INFERIOR)
   -------------------------------------------------------------------------- */
.bq-cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 480px;
  width: calc(100% - 48px);
  background: rgba(11, 26, 19, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(161, 130, 74, 0.35);
  border-radius: var(--radius-md, 16px);
  padding: 24px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #f3f5ee;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  opacity: 0;
  transform: translateY(30px);
  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);
}

.bq-cookie-banner.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bq-cookie-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bq-cookie-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(161, 130, 74, 0.25), rgba(39, 89, 68, 0.35));
  border: 1px solid rgba(161, 130, 74, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-300, #d4b882);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.bq-cookie-title {
  margin: 0;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.bq-cookie-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.bq-cookie-text a {
  color: var(--color-gold-300, #d4b882);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

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

.bq-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.bq-btn-cookie {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  text-decoration: none;
}

.bq-btn-cookie-primary {
  background: linear-gradient(135deg, var(--color-gold-500, #a1824a), var(--color-gold-400, #b89758));
  color: #0b1a13;
  box-shadow: 0 4px 14px rgba(161, 130, 74, 0.35);
}

.bq-btn-cookie-primary:hover {
  background: linear-gradient(135deg, var(--color-gold-400, #b89758), var(--color-gold-300, #d4b882));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(161, 130, 74, 0.45);
}

.bq-btn-cookie-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.bq-btn-cookie-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.bq-btn-cookie-link {
  background: transparent;
  color: #94a3b8;
  padding: 8px 12px;
  border: none;
}

.bq-btn-cookie-link:hover {
  color: var(--color-gold-300, #d4b882);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   2. MODALES LEGALES Y DE COOKIES (OVERLAY SYSTEM)
   -------------------------------------------------------------------------- */
.bq-legal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 19, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bq-legal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bq-legal-modal {
  background: #0f221a;
  border: 1px solid rgba(161, 130, 74, 0.3);
  border-radius: var(--radius-lg, 22px);
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

.bq-legal-header {
  padding: 24px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 26, 19, 0.6);
}

.bq-legal-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bq-legal-header-title i {
  color: var(--color-gold-400, #b89758);
  font-size: 1.3rem;
}

.bq-legal-header-title h3 {
  margin: 0;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.bq-legal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.bq-legal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: rotate(90deg);
}

.bq-legal-body {
  padding: 30px;
  overflow-y: auto;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.94rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.bq-legal-body::-webkit-scrollbar {
  width: 6px;
}

.bq-legal-body::-webkit-scrollbar-track {
  background: rgba(11, 26, 19, 0.4);
}

.bq-legal-body::-webkit-scrollbar-thumb {
  background: rgba(161, 130, 74, 0.35);
  border-radius: 3px;
}

.bq-legal-body h4 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  color: #ffffff;
  font-size: 1.15rem;
  margin: 24px 0 10px 0;
  font-weight: 700;
}

.bq-legal-body h4:first-child {
  margin-top: 0;
}

.bq-legal-body p {
  margin-bottom: 14px;
}

.bq-legal-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.bq-legal-body ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.bq-legal-body ul li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--color-gold-400, #b89758);
  font-weight: bold;
}

.bq-legal-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(39, 89, 68, 0.3);
  color: #86efac;
  border: 1px solid rgba(39, 89, 68, 0.5);
  margin-bottom: 16px;
}

.bq-legal-footer {
  padding: 18px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(11, 26, 19, 0.6);
}

/* --------------------------------------------------------------------------
   3. PANEL DE PREFERENCIAS DE COOKIES (SELECTOR POR CATEGORÍA)
   -------------------------------------------------------------------------- */
.bq-cookie-category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.bq-cookie-category:hover {
  border-color: rgba(161, 130, 74, 0.25);
}

.bq-cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bq-cookie-category-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Switch Toggle UI */
.bq-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

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

.bq-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.18);
  transition: .3s;
  border-radius: 34px;
}

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

.bq-switch input:checked + .bq-slider {
  background-color: var(--color-gold-500, #a1824a);
}

.bq-switch input:focus + .bq-slider {
  box-shadow: 0 0 1px var(--color-gold-500, #a1824a);
}

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

.bq-switch input:disabled + .bq-slider {
  background-color: rgba(39, 89, 68, 0.4);
  cursor: not-allowed;
  opacity: 0.7;
}

.bq-switch input:disabled + .bq-slider:before {
  background-color: #a7f3d0;
}

.bq-badge-required {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(39, 89, 68, 0.35);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   4. CASILLA DE CONSENTIMIENTO EN FORMULARIO DE CONTACTO
   -------------------------------------------------------------------------- */
.form_privacy_consent {
  margin: 16px 0 12px 0;
  text-align: left;
}

.consent_label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-body, #3c4c43);
  cursor: pointer;
  user-select: none;
}

.consent_label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-gold-500, #a1824a);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.consent_label a {
  color: var(--color-gold-600, #856a37);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.consent_label a:hover {
  color: var(--color-forest-800, #143024);
}

/* Dark mode override for contact consent */
body.dark .consent_label {
  color: #cbd5e1;
}

body.dark .consent_label a {
  color: var(--color-gold-300, #d4b882);
}

body.dark .consent_label a:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   5. ENLACES LEGALES EN FOOTER
   -------------------------------------------------------------------------- */
.footer_legal_links {
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer_legal_links a,
.footer_legal_links button {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer_legal_links a:hover,
.footer_legal_links button:hover {
  color: var(--color-gold-300, #d4b882);
  text-decoration: underline;
}

.footer_legal_sep {
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 640px) {
  .bq-cookie-banner {
    bottom: 16px;
    right: 16px;
    width: calc(100% - 32px);
    padding: 18px;
  }
  
  .bq-cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .bq-btn-cookie {
    width: 100%;
  }
  
  .bq-legal-modal {
    max-height: 94vh;
  }
  
  .bq-legal-header {
    padding: 16px 20px;
  }
  
  .bq-legal-body {
    padding: 20px;
  }
  
  .bq-legal-footer {
    padding: 14px 20px;
  }
}
