/* =================================================
   MODALES – BASE (INSCRIPCIÓN + RESUMEN)
   ================================================= */

.sa-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
}

.sa-modal.sa-modal--open {
    display: flex;
}

.sa-modal__content {
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 26px;
}

.sa-modal__inner {
    background: #ffffff;
    width: 92%;
    max-width: 500px;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 42px rgba(0, 0, 0, 0.18);
    position: relative;
    animation: saModalFade 0.25s ease-out;
    max-height: 90vh;
    overflow: hidden;
}

@keyframes saModalFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botón cerrar */
.sa-modal__close {
    position: absolute;
    right: 14px;
    top: 12px;
    background: none !important;
    border: none !important;
    padding: 0;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    color: #000 !important;
}

.sa-modal__inner h3 {
    margin: 0 0 22px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* =================================================
   BOTONES – SISTEMA ÚNICO
   ================================================= */

.sa-modal .button-primary,
.sa-open-inscribe.button-primary,
.sa-activity-price-row .button-primary {
    color: #ffffff !important;
    background-color: #C4122F !important;
    border-color: #C4122F !important;
    padding: 8px 16px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.sa-modal .button-primary:hover,
.sa-open-inscribe.button-primary:hover,
.sa-activity-price-row .button-primary:hover {
    background-color: #a32816 !important;
    border-color: #a32816 !important;
}

/* Botón secundario (Volver / Cancelar) */
.sa-modal .button-secondary {
    background: #f2f2f2 !important;
    color: #333 !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    line-height: 1.2;
}

.sa-modal .button-secondary:hover {
    background: #e6e6e6 !important;
    border-color: #cfcfcf !important;
}

/* =================================================
   MODAL INSCRIPCIÓN CERRADA (INTEGRADO)
   ================================================= */

.sa-modal--no-inscription .sa-modal__content {
  padding: 24px 26px;
}

/* Bloque contenido (igual que summary) */
.sa-modal--no-inscription .sa-summary-block {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

/* Título */
.sa-modal--no-inscription .sa-summary-block h2 {
  margin-bottom: 16px !important;
  font-size: 20px;
}

/* Texto */
.sa-modal--no-inscription p {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Acciones (botón abajo derecha) */
.sa-modal--no-inscription .sa-summary-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}


/* =================================================
   MODAL INSCRIPCIÓN – ALUMNOS
   ================================================= */

.sa-alumnos-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
    margin: 0 0 12px;
    list-style: none;
}

.sa-alumno-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    background: #fff;
    cursor: pointer;
    transition: box-shadow .15s ease, transform .06s ease, border-color .12s ease;
    user-select: none;
}

.sa-alumno-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.sa-alumno-card.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sa-alumno-name {
    font-weight: 600;
    color: #222;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sa-alumno-curso {
    font-size: 0.8rem;
    opacity: 0.7;
}

.sa-alumno-inscrito {
    font-size: 0.75rem;
    color: #a00;
}

.sa-alumno-checkbox {
    position: absolute !important;
    opacity: 0 !important;
}

.sa-alumno-checkmark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f2f2f2;
    color: transparent;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sa-alumno-card.selected {
    background: #fff6f7;
    border-color: rgba(196, 18, 47, 0.25);
    box-shadow: 0 6px 18px rgba(196, 18, 47, 0.06);
    transform: translateY(-1px);
}

.sa-alumno-card.selected .sa-alumno-checkmark {
    background: #C4122F;
    color: #fff;
}

.sa-modal--inscribe .sa-inscribe-block {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

/* =================================================
   TARIFAS EN FICHA DE ACTIVIDAD
   ================================================= */

.sa-activity-prices-list,
.sa-activity-prices-list * {
    box-sizing: border-box;
}

.sa-activity-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.sa-activity-price-row>div:first-child {
    flex: 1;
}

.sa-activity-price-label p,
.sa-activity-price-value p {
    font-weight: 700;
    margin: 0;
}

/* Forzar que cada tarifa ocupe todo el ancho */
.sa-activity-prices-list {
    width: 100%;
}

.sa-activity-price-row {
    width: 100%;
}
/* =================================================
   MODAL - HORAS
================================================= */

/* TÍTULO + TEXTO */
.sa-modal--horarios h2 {
  margin-bottom: 8px !important;
}

.sa-modal--horarios p {
  margin-bottom: 15px !important;
}

/* BLOQUE ALUMNO */
.sa-slot-alumno {
  margin-bottom: 18px !important;
}

.sa-slot-alumno h3 {
  margin-bottom: 10px !important;
}

/* GRID DÍAS */
.sa-slots-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* BLOQUE DÍA */
.sa-slot-day {
  display: flex;
  flex-direction: column; /* 🔥 CLAVE */
  background: #f9f9f9;
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 5px;
}

/* NOMBRE DEL DÍA */
.sa-slot-day strong {
  font-size: 14px;
  margin-right: 6px;
  white-space: nowrap;
}

.sa-slot-pill.is-full {
  opacity: 0.5;
  cursor: not-allowed;
}

.sa-slot-pill.is-full .sa-slot-time {
  text-decoration: line-through;
}

.sa-slot-places {
  display: block;
  font-size: 11px;
  color: #666;
}


/* =================================================
   TARJETAS HORARIO (ESTILO PRO)
================================================= */

.sa-slot-pill {
  display: flex;
  align-items: center;
  gap: 8px; 

  min-width: 120px; 
  padding: 6px 10px;

  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e5e5;

  cursor: pointer;
  transition: all .2s ease;
}

/* OCULTAR CHECKBOX */
.sa-slot-pill input {
  display: none;
}

/* TEXTO */
.sa-slot-pill-text {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

/* ICONO CHECK */
.sa-slot-check {
  width: 18px;
  height: 18px;
  border-radius: 8px;

  background: #eee;
  color: transparent;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: bold;
  transition: all .2s ease;
}

/* HOVER */
.sa-slot-pill:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* SELECCIONADO */
.sa-slot-pill.selected {
  background: #fff6f7;
  border-color: rgba(196,18,47,0.3);
}

/* CHECK ACTIVO */
.sa-slot-pill.selected .sa-slot-check {
  background: #C4122F;
  color: #fff;
}

/* DESHABILITADO */
.sa-slot-pill input:disabled + .sa-slot-pill-text {
  opacity: 0.5;
  cursor: not-allowed;
}

.sa-slot-day-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.sa-slot-day-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* =================================================
   MODAL RESUMEN – SOLO LO ESPECÍFICO
   ================================================= */

.sa-modal--summary .sa-summary-block {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.sa-modal--summary .sa-summary-block:last-child {
    border-bottom: none;
}

.sa-modal--summary .sa-summary-block p,
.sa-modal--summary .sa-summary-block ul {
    margin: 0;
    font-size: 15px;
}

.sa-modal--summary .sa-summary-block ul {
    padding-left: 18px;
}

.sa-modal--summary .sa-summary-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

/* Agrupar tarifa + precio como un solo bloque */
.sa-modal--summary #sa-summary-tarifa {
    padding-top: 5px;
    margin: 0 !important;
    font-weight: 600 !important;

}

.sa-modal--summary .sa-summary-price {
    margin: 0 !important;
    font-weight: 600 !important;
}

.sa-modal--summary #sa-summary-alumnos {
    padding-top: 5px;
    font-weight: 600 ;
}

.sa-modal--summary .sa-summary-total {
    font-weight: 800 !important;
    margin-top: 6px !important;
    display: block !important;
}
/* Nombre alumno en negrita */
.sa-summary-alumno-nombre {
  font-weight: 700;
}

/* Día en negrita */
.sa-summary-alumno-slots strong {
  font-weight: 700;
}



/* =================================================
   RESPONSIVE
   ================================================= */

@media (max-width: 480px) {
    

    .sa-activity-price-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sa-activity-price-row .button-primary {
        width: 100%;
    }
}

.sa-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sa-spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes sa-spin {
    to {
        transform: rotate(360deg);
    }
}

