/* Cookie consent modal — bloqueante centrado + overlay oscuro */

/* Bloquea scroll del body cuando el modal está abierto */
html.cc-locked,
html.cc-locked body {
  overflow: hidden !important;
}

.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: cc-fade-in 200ms ease-out;
}

.cc-modal {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  animation: cc-scale-in 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cc-modal-content {
  padding: 32px;
}

.cc-title {
  font-family: Montserrat, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy, #0d1b2a);
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.cc-body {
  font-family: Lato, sans-serif;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.55;
  margin: 0 0 24px 0;
}

.cc-link {
  color: var(--orange, #f6a66d);
  text-decoration: underline;
  font-weight: 600;
}

.cc-link:hover {
  text-decoration: none;
}

/* Botones de acción al mismo nivel jerárquico (requisito AEPD) */
.cc-actions {
  display: flex;
  gap: 12px;
  margin: 0 0 16px 0;
}

.cc-btn {
  flex: 1;
  font-family: Montserrat, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  line-height: 1.2;
  min-height: 48px;
}

.cc-btn:hover {
  transform: translateY(-1px);
}

.cc-btn:focus-visible {
  outline: 3px solid rgba(246, 166, 109, 0.5);
  outline-offset: 2px;
}

.cc-btn-accept {
  background: var(--orange, #f6a66d);
  color: #fff;
  border: 2px solid var(--orange, #f6a66d);
}

.cc-btn-accept:hover {
  box-shadow: 0 4px 12px rgba(246, 166, 109, 0.4);
}

.cc-btn-reject {
  background: #fff;
  color: var(--navy, #0d1b2a);
  border: 2px solid var(--navy, #0d1b2a);
}

.cc-btn-reject:hover {
  background: #f5f5f5;
}

.cc-link-configure {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px;
  background: none;
  border: none;
  font-family: Lato, sans-serif;
  font-size: 0.9rem;
  color: var(--navy, #0d1b2a);
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}

.cc-link-configure:hover {
  text-decoration: none;
  color: var(--orange, #f6a66d);
}

.cc-link-configure:focus-visible {
  outline: 2px solid rgba(246, 166, 109, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Vista de configuración: categorías */
.cc-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 24px 0;
}

.cc-category {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cc-category:hover {
  border-color: var(--orange, #f6a66d);
  background: #fffaf5;
}

.cc-category-disabled {
  cursor: default;
  opacity: 0.7;
  background: #f9fafb;
}

.cc-category-disabled:hover {
  border-color: #e5e7eb;
  background: #f9fafb;
}

.cc-category input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0 0;
  flex-shrink: 0;
  accent-color: var(--orange, #f6a66d);
  cursor: pointer;
}

.cc-category input[type="checkbox"]:disabled {
  cursor: default;
}

.cc-category-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cc-category-text strong {
  font-family: Montserrat, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy, #0d1b2a);
}

.cc-category-text small {
  font-family: Lato, sans-serif;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}

/* Animaciones */
@keyframes cc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cc-scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Botón "Configurar cookies" del footer global */
.cookie-settings-link {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
}

.cookie-settings-link:hover {
  text-decoration: none;
}

/* Responsive: móvil */
@media (max-width: 480px) {
  .cc-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .cc-modal {
    border-radius: 12px 12px 0 0;
    max-height: 95vh;
  }
  .cc-modal-content {
    padding: 24px 20px;
  }
  .cc-title {
    font-size: 1.25rem;
  }
  .cc-actions {
    flex-direction: column;
  }
  .cc-btn {
    width: 100%;
  }
}

/* Reduce motion: respeta prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .cc-overlay,
  .cc-modal {
    animation: none;
  }
  .cc-btn {
    transition: none;
  }
  .cc-btn:hover {
    transform: none;
  }
}
