/* Contenedores principales */
.sessions-progress {
    margin: 20px 0;
}

/* Estados de la barra de progreso */
.progress-item[data-full="true"] .progress,
.progress-item.complete .progress,
.progress.complete {
    background-color: #f44336 !important;
    transition: background-color 0.3s ease !important;
}

.progress-item.exceeded .progress,
.progress.exceeded {
    background-color: #ff4444 !important;
}

/* Texto de progreso para barras completas */
.progress-item[data-full="true"] .progress-text,
.progress-item.complete .progress-text {
    color: #f44336 !important;
    font-weight: bold !important;
}

/* Asegurar que las transiciones sean suaves */
.progress,
.progress-text {
    transition: all 0.3s ease-in-out !important;
}

.progress-item {
    margin-bottom: 15px;
    margin-top: 20px;
}

/* Etiquetas */
.progress-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Barra de progreso base */
.progress-bar {
    background-color: #f5f5f5;
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
    position: relative;
}

/* Elemento de progreso */
.progress {
    background-color: #4CAF50;
    height: 100%;
    transition: all 0.3s ease !important;
    position: absolute;
    left: 0;
    top: 0;
}

/* Estados de la barra de progreso */
.progress-item.complete .progress-bar .progress,
.progress-item[data-full="true"] .progress-bar .progress {
    background-color: #f44336 !important;
}

/* Texto de progreso */
.progress-text {
    display: flex !important;
    /* Forzar display flex */
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    visibility: visible !important;
    /* Asegurar visibilidad */
}

.progress-text .text-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.progress-text .selected-count.full {
    color: #f44336;
    font-weight: bold;
}

.progress-text .available-count.no-sessions {
    color: #999;
    text-decoration: line-through;
}

.progress-text .separator {
    margin: 0 5px;
}

.progress-text .selected-count.full {
    color: #f44336;
    font-weight: bold;
}

.progress-text .available-count.no-sessions {
    color: #999;
    text-decoration: line-through;
}

/* Estado de reserva deshabilitada */
.progress-item.disable-booking {
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    transition: all 0.3s ease-in-out;
}

.progress-item.disable-booking .progress-bar,
.progress-item.disable-booking .progress-text {
    display: none !important;
}

/* Mensaje de límite de reserva */
.booking-limit-message {
    display: none;
    color: #d32f2f;
    font-weight: 500;
    text-align: center;
    padding: 10px;
    margin-top: 0;
}

.progress-item.disable-booking .booking-limit-message {
    display: block;
}

/* Estado del calendario deshabilitado */
.calendar-disabled {
    opacity: 0.7;
    pointer-events: none;
}

.calendar-disabled .jet-apb-calendar {
    opacity: 0.5;
    pointer-events: none;
}

/* Estilos para el calendario deshabilitado */
.jet-apb-calendar-appointments-list.disabled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.jet-apb-calendar-appointments-list.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

/* Botón de envío deshabilitado */
.jet-form-builder__submit[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Visibilidad inicial y transiciones */
.jet-apb-calendar-wrapper,
#sessions-progress-container {
    visibility: visible;
    transition: visibility 0.3s ease-in-out;
}

/* Estilos para el select deshabilitado */
.jet-form-builder__field.select-field.disabled {
    opacity: 0.6;
    pointer-events: none;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .sessions-progress {
        padding: 0 10px;
    }

    .progress-bar {
        height: 16px;
    }

    .progress-text {
        font-size: 0.85em;
    }
}

.info-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 4px;
}

.info-header {
    font-weight: bold;
    margin-bottom: 8px;
}

.info-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-details .booked {
    color: #666;
}

.info-details .available {
    color: #4CAF50;
    font-weight: 500;
}

.info-details .separator {
    flex: 1;
    min-width: 20px;
}

/* Estilos para el modal de límite de reservas */
.limit-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.limit-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 4px;
    text-align: center;
}

.limit-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.limit-modal-close:hover,
.limit-modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}