/* =========================================
   BANNER DE COOKIES
   ========================================= */

.cookies-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background-color: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.10);
  padding: 1.25rem 1.5rem;
  animation: subirBanner 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

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

.cookies-banner__inner {
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookies-banner__texto {
  flex: 1;
  min-width: 200px;
  font-size: 0.875rem;
  color: #555;
  line-height: 1.6;
}

.cookies-banner__texto a {
  color: #1B6DB5;
  text-decoration: underline;
}

.cookies-banner__acciones {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

/* Botones del banner */
.cookies-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  min-height: 40px;
}

.cookies-btn--aceptar {
  background-color: #1B6DB5;
  color: #fff;
  border-color: #1B6DB5;
}

.cookies-btn--aceptar:hover {
  background-color: #145596;
  border-color: #145596;
}

.cookies-btn--rechazar {
  background-color: transparent;
  color: #1B6DB5;
  border-color: #1B6DB5;
}

.cookies-btn--rechazar:hover {
  background-color: #f0f7ff;
}

.cookies-btn--configurar {
  background-color: transparent;
  color: #555;
  border-color: #e2e8f0;
}

.cookies-btn--configurar:hover {
  border-color: #aaa;
  color: #333;
}

/* =========================================
   MODAL DE CONFIGURACIÓN
   ========================================= */

.cookies-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeOverlay 0.25s ease both;
}

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

.cookies-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalEntrada 0.3s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes modalEntrada {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.cookies-modal__cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.cookies-modal__titulo {
  font-size: 1rem;
  font-weight: 700;
  color: #2d2d2d;
}

.cookies-modal__cerrar {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: #888;
  padding: 0.25rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.cookies-modal__cerrar:hover { color: #333; }

.cookies-modal__cuerpo {
  padding: 0.5rem 0;
}

/* Fila de categoría */
.cookies-categoria {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.cookies-categoria:last-child { border-bottom: none; }

.cookies-categoria__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.cookies-categoria__nombre {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d2d2d;
}

.cookies-categoria__desc {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.5;
}

/* Toggle switch */
.cookies-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookies-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookies-toggle__slider {
  position: absolute;
  inset: 0;
  background-color: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cookies-toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  left: 3px;
  top: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cookies-toggle input:checked + .cookies-toggle__slider {
  background-color: #1B6DB5;
}

.cookies-toggle input:checked + .cookies-toggle__slider::before {
  transform: translateX(20px);
}

.cookies-toggle input:disabled + .cookies-toggle__slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookies-toggle input:focus-visible + .cookies-toggle__slider {
  outline: 2px solid #1B6DB5;
  outline-offset: 2px;
}

/* Footer del modal */
.cookies-modal__footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.cookies-btn--guardar {
  width: 100%;
  padding: 0.75rem;
  background-color: #1B6DB5;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cookies-btn--guardar:hover { background-color: #145596; }
