/* ==========================================================================
   Modal y Banner de Cookies — Social & Tech
   Estilo consistente con la identidad de marca (Montserrat, Kalam, --pink)
   ========================================================================== */

.cookie-modal-wrapper {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Las reglas display de abajo (.cookie-options-list, .button) anulan el atributo
   hidden que cookies.js usa para plegar las preferencias; esto lo restablece. */
.cookie-modal-wrapper [hidden] {
  display: none !important;
}

.cookie-modal-wrapper.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 27, 27, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.cookie-modal-card {
  position: relative;
  background: var(--paper, #fcfcfb);
  border: 1px solid var(--line, #dedddc);
  border-radius: 14px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 30px;
  box-shadow: 0 24px 50px -12px rgba(27, 27, 27, 0.25), 0 4px 15px rgba(234, 29, 118, 0.08);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal-wrapper.is-open .cookie-modal-card {
  transform: translateY(0) scale(1);
}

.cookie-modal-header {
  margin-bottom: 16px;
}

.cookie-modal-header .eyebrow {
  margin-bottom: 10px;
  display: inline-block;
}

.cookie-modal-header h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.2rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.cookie-modal-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: #3b3a39;
  margin-bottom: 22px;
}

.cookie-modal-desc strong {
  color: var(--ink, #1b1b1b);
}

.cookie-modal-desc a {
  color: var(--pink-dark, #b51057);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Panel de preferencias detalladas */
.cookie-options-list {
  background: #f7f6f5;
  border: 1px solid #e7e5e3;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-option-item:not(:last-child) {
  padding-bottom: 14px;
  border-bottom: 1px solid #eae8e6;
}

.cookie-option-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink, #1b1b1b);
  margin-bottom: 3px;
}

.cookie-option-text p {
  font-size: 12px;
  line-height: 1.5;
  color: #666360;
  margin: 0;
}

.cookie-status-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pink-dark, #b51057);
  background: var(--pink-light, #ffe8f1);
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Switch interactivo para cookies analíticas */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

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

.cookie-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

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

.cookie-toggle input:focus-visible + .cookie-slider {
  outline: 2px solid var(--pink-dark);
  outline-offset: 2px;
}

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

/* Botones de acción */
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cookie-modal-actions .button {
  cursor: pointer;
  border-radius: 6px;
}

.cookie-customize-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #666360;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  margin-left: auto;
}

.cookie-customize-btn:hover {
  color: var(--pink, #ea1d76);
}

/* Enlace en el footer para reabrir el modal */
.footer-cookie-btn {
  background: none;
  border: none;
  padding: 0;
  color: #bdbdbd;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.footer-cookie-btn:hover {
  color: #ff7daf;
}

@media (max-width: 600px) {
  .cookie-modal-card {
    padding: 26px 20px;
    border-radius: 12px;
  }
  .cookie-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-modal-actions .button {
    width: 100%;
  }
  .cookie-customize-btn {
    margin-left: 0;
    text-align: center;
    padding-top: 6px;
  }
}

/* Cursor personalizado por encima del modal */
.cursor-dot {
  z-index: 100000 !important;
}

