/* ====================================
   SISTEMA DE COOKIES - GDPR COMPLIANT
   ==================================== */

/* Banner de cookies */
#cookieBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 30, 30, 0.98);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 20px;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
  display: none; /* Oculto por defecto, JS lo mostrará si es necesario */
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-container {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-content {
  flex: 1;
  min-width: 280px;
}

.cookie-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--gold-soft, #C9A46A);
}

.cookie-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.cookie-text a {
  color: var(--gold-soft, #C9A46A);
  text-decoration: underline;
  text-decoration-color: rgba(201, 164, 106, 0.4);
  transition: text-decoration-color 0.2s ease;
}

.cookie-text a:hover {
  text-decoration-color: rgba(201, 164, 106, 1);
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 0;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.03em;
  white-space: nowrap;
  min-height: 44px;
}

.cookie-btn-reject {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.cookie-btn-accept {
  background: var(--gold-soft, #C9A46A);
  color: #1E1E1E;
  border: 1px solid var(--gold-soft, #C9A46A);
}

.cookie-btn-accept:hover {
  background: #D4B07C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 164, 106, 0.4);
}

.cookie-btn-configure {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-configure:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Modal de configuración */
#cookieSettings {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-settings-content {
  background: #fff;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInModal 0.3s ease;
}

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

.cookie-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cookie-settings-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink, #1E1E1E);
  margin: 0;
}

.cookie-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--muted, #7D7D7D);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cookie-close:hover {
  color: var(--ink, #1E1E1E);
  transform: rotate(90deg);
}

.cookie-category {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg, #FAF9F7);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

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

.cookie-category-title {
  font-family: "Lato", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink, #1E1E1E);
}

.cookie-category-description {
  font-size: 0.92rem;
  color: var(--muted, #7D7D7D);
  line-height: 1.5;
  margin: 0;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

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

.cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

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

.cookie-toggle input:checked + .cookie-slider {
  background-color: var(--brand, #015291);
}

.cookie-toggle input:checked + .cookie-slider:before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-slider {
  background-color: var(--gold-soft, #C9A46A);
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-settings-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: flex-end;
}

.cookie-btn-save {
  padding: 12px 28px;
  background: var(--brand, #015291);
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.03em;
  min-height: 44px;
}

.cookie-btn-save:hover {
  background: #013d6b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(1, 82, 145, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-container {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    min-width: 0;
  }

  .cookie-settings-content {
    padding: 24px 20px;
    max-height: 85vh;
  }

  .cookie-settings-title {
    font-size: 1.3rem;
  }

  .cookie-category {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  #cookieBanner {
    padding: 16px;
  }

  .cookie-title {
    font-size: 1.1rem;
  }

  .cookie-text {
    font-size: 0.88rem;
  }

  .cookie-btn {
    padding: 10px 16px;
    font-size: 0.88rem;
  }
}
