/* =========================================================================
   SINIGUAL — Estilos del sistema de consentimiento de cookies.
   Todas las reglas del banner y del panel de configuración viven aquí.
   ========================================================================= */

.cc-banner,
.cc-modal__overlay {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  box-sizing: border-box;
}

.cc-banner *,
.cc-modal__overlay * {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------------
   Banner (primera capa)
   ------------------------------------------------------------------- */

.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  background: #f0f7fd;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  max-height: 60vh;
  overflow-y: auto;
}

.cc-banner__content {
  flex: 1 1 320px;
  min-width: 240px;
}

.cc-banner__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: #1c1c1c;
  letter-spacing: -0.01em;
}

.cc-banner__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #3f434b;
}

.cc-banner__link {
  color: #F4564A;
  font-weight: 700;
  text-decoration: underline;
}

.cc-banner__link:hover {
  color: #d63b30;
}

.cc-banner__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

/* ---------------------------------------------------------------------
   Botones compartidos
   ------------------------------------------------------------------- */

.cc-btn {
  font-family: inherit;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  min-height: 44px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.cc-btn--primary {
  background: #F4564A;
  color: #ffffff;
  border-color: #F4564A;
}

.cc-btn--primary:hover {
  background: #d63b30;
  border-color: #d63b30;
}

.cc-btn--secondary {
  background: #ffffff;
  color: #1c1c1c;
  border-color: rgba(0, 0, 0, 0.18);
}

.cc-btn--secondary:hover {
  border-color: rgba(0, 0, 0, 0.32);
}

.cc-btn--ghost {
  background: transparent;
  color: #1c1c1c;
  border-color: transparent;
  text-decoration: underline;
}

.cc-btn--ghost:hover {
  color: #F4564A;
}

.cc-btn:focus-visible,
.cc-banner__link:focus-visible,
.cc-modal__close:focus-visible,
.cc-switch input:focus-visible + .cc-switch__track {
  outline: 3px solid #F4564A;
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Modal de configuración
   ------------------------------------------------------------------- */

body.cc-no-scroll {
  overflow: hidden;
}

.cc-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 20, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cc-modal__dialog {
  background: #ffffff;
  color: #1c1c1c;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.cc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex: 0 0 auto;
}

.cc-modal__title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cc-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: #6b6e76;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
}

.cc-modal__close:hover {
  color: #1c1c1c;
}

.cc-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.cc-modal__intro {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #3f434b;
}

.cc-cat {
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cc-cat:first-of-type {
  border-top: none;
  padding-top: 0;
}

.cc-cat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-cat__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.cc-cat__status {
  font-size: 12px;
  font-weight: 700;
  color: #6b6e76;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cc-cat__status--fixed {
  color: #1f8a5b;
}

.cc-cat__desc {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #5a5d65;
}

/* Interruptor accesible */

.cc-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  cursor: pointer;
}

.cc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cc-switch input:disabled {
  cursor: not-allowed;
}

.cc-switch__track {
  position: absolute;
  top: 50%;
  left: 0;
  width: 44px;
  height: 26px;
  transform: translateY(-50%);
  background: #d9dbe0;
  border-radius: 999px;
  transition: background-color 0.18s ease;
}

.cc-switch__track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease;
}

.cc-switch input:checked + .cc-switch__track {
  background: #F4564A;
}

.cc-switch input:checked + .cc-switch__track::before {
  transform: translateX(18px);
}

.cc-switch input:disabled + .cc-switch__track {
  background: #1f8a5b;
  opacity: 0.55;
}

.cc-modal__footer {
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------------
   Botón "Configurar cookies" del pie de página
   ------------------------------------------------------------------- */

.cookie-settings-link {
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
  color: #a7a9af;
  font-size: 14px;
  text-align: left;
}

.cookie-settings-link:hover {
  color: #ffffff;
}

/* ---------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------- */

@media (max-width: 640px) {
  .cc-banner {
    padding: 18px 16px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .cc-banner__content {
    flex: none;
  }

  .cc-banner__actions {
    margin-left: 0;
    flex-direction: column;
  }

  .cc-btn {
    width: 100%;
    text-align: center;
  }

  .cc-modal__overlay {
    padding: 0;
    align-items: flex-end;
  }

  .cc-modal__dialog {
    max-width: none;
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }

  .cc-modal__footer {
    flex-direction: column;
  }
}

/* ---------------------------------------------------------------------
   Movimiento reducido
   ------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .cc-switch__track,
  .cc-switch__track::before {
    transition: none;
  }
}
