﻿/* Estilos profesionales para el calendario */
.calendario-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0px 10px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
}

/* HEADER MÁS PEQUEÑO CON BOTONES EN LÍNEA */
.calendario-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding: 25px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    border-radius: 6px;
    color: white;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.15);
    position: relative;
    overflow: hidden;
}

.calendario-info {
    text-align: center;
}

    .calendario-info h1 {
        margin: 0 0 3px 0;
        font-size: 1.1em;
        font-weight: 700;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        line-height: 1.1;
    }

.profesional-nombre {
    margin: 0;
    font-size: 0.8em;
    opacity: 0.95;
    font-weight: 400;
}

/* NAVEGACIÓN EN LÍNEA - BOTONES AL MISMO NIVEL */
.calendario-navegacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-navegacion {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.75em;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 0 0 auto;
}

    .btn-navegacion:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .btn-navegacion:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none;
    }

.semana-actual {
    font-size: 0.8em;
    font-weight: 600;
    margin: 0;
    text-align: center;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.95);
    min-width: 180px;
    padding: 0 8px;
}

.servicio-selector {
    margin-bottom: 12px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

    .servicio-selector label {
        font-weight: 600;
        margin-bottom: 6px;
        display: block;
        color: #1e293b;
        font-size: 0.9em;
    }

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    }

/* Estructura de tabla responsive */
.calendario-semana {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabla-calendario {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 500px;
}

/* Encabezados responsive */
.header-vacio {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid #e2e8f0;
    min-width: 50px;
    position: sticky;
    left: 0;
    z-index: 10;
}

.header-dia {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 8px 6px;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    min-width: 80px;
    position: relative;
}

    .header-dia.hoy {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: white;
    }

        .header-dia.hoy::after {
            content: 'HOY';
            position: absolute;
            top: 2px;
            right: 2px;
            background: rgba(255,255,255,0.25);
            color: white;
            padding: 1px 2px;
            border-radius: 2px;
            font-size: 0.5em;
            font-weight: 700;
        }

.nombre-dia {
    font-weight: 700;
    font-size: 0.65em;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.1px;
    color: #475569;
}

.header-dia.hoy .nombre-dia {
    color: white;
}

.fecha-dia {
    font-size: 1em;
    font-weight: 800;
    color: #1e293b;
}

.header-dia.hoy .fecha-dia {
    color: white;
}

/* Filas y celdas responsive */
.fila-horario {
    border-bottom: 1px solid #f1f5f9;
}

.celda-hora {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 8px 6px;
    text-align: center;
    font-weight: 700;
    border-right: 2px solid #e2e8f0;
    min-width: 50px;
    color: #475569;
    font-size: 0.8em;
    position: sticky;
    left: 0;
    z-index: 5;
}

    .celda-hora::after {
        content: '';
        position: absolute;
        right: -1px;
        top: 50%;
        transform: translateY(-50%);
        width: 2px;
        height: 60%;
        background: #3b82f6;
        opacity: 0.4;
    }

.celda-dia {
    padding: 4px 3px;
    text-align: center;
    border-right: 1px solid #f1f5f9;
    min-width: 80px;
    height: 45px;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .celda-dia.disponible {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border: 2px solid #16a34a;
        border-radius: 4px;
        margin: 1px;
        box-shadow: 0 1px 3px rgba(22, 163, 74, 0.15);
    }

        .celda-dia.disponible:hover {
            background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
            color: white;
            transform: scale(1.02);
            box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
        }

    .celda-dia.no-disponible {
        background: #fafafa;
        cursor: not-allowed;
        opacity: 0.5;
    }

.horario-disponible,
.horario-no-disponible {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1px;
}

    .horario-disponible span {
        font-weight: 700;
        font-size: 0.75em;
        margin-bottom: 1px;
        color: #166534;
    }

.celda-dia.disponible:hover .horario-disponible span {
    color: white;
}

.estado {
    font-size: 0.55em;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 4px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.1px;
}

.celda-dia.disponible .estado {
    background: #16a34a;
    color: white;
}

.celda-dia.disponible:hover .estado {
    background: white;
    color: #16a34a;
}

.dia-pasado {
    color: #94a3b8;
    font-style: italic;
    opacity: 0.4;
    font-size: 0.7em;
}

.horario-no-disponible span {
    color: #94a3b8;
    font-size: 0.75em;
}

/* ============================ */
/* MODAL COMPLETAMENTE VISIBLE - ALTURA AJUSTADA */
/* ============================ */

/* Modal Principal - Altura ajustada al contenido */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    padding: 5px;
    box-sizing: border-box;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.confirmar-cita-modal {
    background: white;
    margin: 2% auto;
    border-radius: 10px;
    width: 100%;
    max-width: 380px; /* Reducido para computadores */
    max-height: 550px; /* Altura fija para que quepa todo el contenido */
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.25);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header del Modal - Más compacto */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 4px rgba(30, 58, 138, 0.1);
}

    .modal-header h3 {
        margin: 0;
        font-size: 1em;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 6px;
        letter-spacing: -0.1px;
        line-height: 1.1;
    }

.close {
    font-size: 1.2em;
    cursor: pointer;
    color: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

    .close:hover {
        color: white;
        background: rgba(255,255,255,0.2);
        transform: rotate(90deg);
    }

/* Cuerpo del Modal - Contenido más compacto */
.modal-body {
    padding: 0;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

/* Sistema de Pasos - Más compacto */
.pasos-container {
    position: relative;
    min-height: 220px; /* Reducida para caber mejor */
}

.paso {
    display: none;
    opacity: 0;
    transform: translateX(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

    .paso.activo {
        display: block;
        opacity: 1;
        transform: translateX(0);
    }

    .paso.saliendo {
        transform: translateX(-12px);
        opacity: 0;
    }

/* Secciones del Modal - Más compactas */
.seccion-modal {
    padding: 12px 14px;
    border-bottom: 1px solid #f8fafc;
    background: white;
    transition: all 0.2s ease;
}

    .seccion-modal:last-child {
        border-bottom: none;
    }

    .seccion-modal:hover {
        background: #fafbfc;
    }

.seccion-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f1f5f9;
}

    .seccion-header i {
        color: #3b82f6;
        margin-right: 8px;
        font-size: 0.9em;
        background: #f0f9ff;
        padding: 5px;
        border-radius: 6px;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .seccion-header h4 {
        margin: 0;
        color: #1e293b;
        font-size: 0.9em;
        font-weight: 700;
    }

/* Detalles de la Cita - Más compactos */
.detalles-cita {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detalle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s ease;
    font-size: 0.8em;
}

    .detalle-item:hover {
        background: #f8fafc;
        margin: 0 -4px;
        padding: 4px;
        border-radius: 4px;
        border-bottom-color: transparent;
    }

    .detalle-item:last-child {
        border-bottom: none;
    }

.detalle-label {
    font-weight: 600;
    color: #475569;
    min-width: 60px;
    font-size: 0.8em;
}

.detalle-valor {
    color: #1e293b;
    font-weight: 500;
    text-align: right;
    flex: 1;
    font-size: 0.85em;
    line-height: 1.2;
}

/* Modalidad de Cita - Más compacta */
.modalidad-cita-container {
    margin-top: 0;
}

.modalidad-opciones-modal {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modalidad-opcion-modal {
    position: relative;
}

    .modalidad-opcion-modal label {
        display: flex;
        align-items: flex-start;
        padding: 8px 10px;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        background: #ffffff;
        position: relative;
        overflow: hidden;
        font-size: 0.8em;
    }

        .modalidad-opcion-modal label::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

    .modalidad-opcion-modal input:checked + label {
        border-color: #3b82f6;
        background-color: #f8fafc;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
        transform: translateY(-1px);
    }

        .modalidad-opcion-modal input:checked + label::before {
            transform: scaleX(1);
        }

.modalidad-icono {
    margin-right: 8px;
    color: #64748b;
    font-size: 1em;
    margin-top: 1px;
    transition: all 0.3s ease;
}

.modalidad-opcion-modal input:checked + label .modalidad-icono {
    color: #3b82f6;
    transform: scale(1.05);
}

.modalidad-contenido {
    flex: 1;
}

    .modalidad-contenido strong {
        display: block;
        color: #1e293b;
        margin-bottom: 2px;
        font-size: 0.9em;
        font-weight: 700;
    }

    .modalidad-contenido span {
        color: #64748b;
        font-size: 0.8em;
        line-height: 1.2;
        display: block;
        margin-bottom: 1px;
    }

.direccion-info {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #3b82f6 !important;
    font-size: 0.75em !important;
    font-weight: 600;
    margin-top: 3px;
    padding: 2px 5px;
    background: #f0f9ff;
    border-radius: 3px;
    border-left: 2px solid #3b82f6;
}

.alerta-modalidad {
    display: flex;
    align-items: center;
    padding: 8px;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border-radius: 6px;
    color: #1e40af;
    font-size: 0.8em;
    border: 1px solid #bfdbfe;
    margin-top: 6px;
}

    .alerta-modalidad i {
        margin-right: 6px;
        font-size: 0.9em;
        color: #3b82f6;
    }

/* Sección de Pago - Más compacta */
.info-pago {
    text-align: center;
    margin-bottom: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
    border-radius: 8px;
    border: 2px solid #dcfce7;
}

.total-pago {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.total-label {
    color: #475569;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 0.1px;
}

.total-monto {
    color: #16a34a;
    font-size: 1.1em;
    font-weight: 800;
}

/* Botones - Más compactos */
.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 12px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    position: sticky;
    bottom: 0;
    backdrop-filter: blur(4px);
}

.btn {
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85em;
    font-family: inherit;
    letter-spacing: 0.1px;
    min-width: 90px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.5s;
    }

    .btn:hover::before {
        left: 100%;
    }

.btn-continuar-pago {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

    .btn-continuar-pago:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(22, 163, 74, 0.4);
    }

.btn-volver {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    box-shadow: 0 1px 4px rgba(100, 116, 139, 0.3);
}

    .btn-volver:hover {
        background: linear-gradient(135deg, #475569 0%, #374151 100%);
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(100, 116, 139, 0.4);
    }

.btn-cancelar {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
}

    .btn-cancelar:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
    }

/* Opciones de Pago - Más compactas */
.opciones-pago {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.opcion-pago {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    gap: 8px;
    font-size: 0.8em;
}

    .opcion-pago:hover {
        border-color: #3b82f6;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    }

.opcion-icono {
    color: #64748b;
    font-size: 1.1em;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 6px;
    flex-shrink: 0;
}

.opcion-contenido {
    flex: 1;
}

    .opcion-contenido h5 {
        margin: 0 0 2px 0;
        color: #1e293b;
        font-size: 0.9em;
        font-weight: 700;
    }

    .opcion-contenido p {
        margin: 0 0 2px 0;
        color: #475569;
        font-size: 0.78em;
        line-height: 1.2;
    }

    .opcion-contenido small {
        color: #64748b;
        font-size: 0.72em;
    }

.opcion-accion {
    flex-shrink: 0;
}

/* Secciones específicas de métodos de pago */
.seccion-metodo-pago {
    margin-top: 12px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 0.8em;
}

    .seccion-metodo-pago h5 {
        margin: 0 0 8px 0;
        color: #1e293b;
        font-size: 0.95em;
        font-weight: 700;
        text-align: center;
    }

/* ============================ */
/* RESPONSIVE DESIGN OPTIMIZADO */
/* ============================ */

@media (max-width: 768px) {
    .calendario-container {
        padding: 10px 6px;
    }

    .calendario-header {
        padding: 6px;
        gap: 4px;
        margin-bottom: 8px;
    }

    .calendario-info h1 {
        font-size: 1em;
        margin-bottom: 2px;
    }

    .profesional-nombre {
        font-size: 0.75em;
    }

    /* NAVEGACIÓN EN LÍNEA PARA MÓVILES */
    .calendario-navegacion {
        gap: 8px;
        padding: 4px;
    }

    .btn-navegacion {
        padding: 3px 6px;
        font-size: 0.7em;
        flex: 0 0 auto;
    }

    .semana-actual {
        font-size: 0.75em;
        min-width: 150px;
        padding: 0 6px;
    }

    .servicio-selector {
        margin-bottom: 10px;
        padding: 8px;
    }

        .servicio-selector label {
            font-size: 0.85em;
            margin-bottom: 4px;
        }

    .form-control {
        padding: 6px 8px;
        font-size: 0.8em;
    }

    /* Modal responsive para móviles - Altura ajustada */
    .modal {
        padding: 2px;
    }

    .confirmar-cita-modal {
        margin: 1% auto;
        max-width: 95%;
        border-radius: 8px;
        max-height: 500px; /* Altura reducida para móviles */
    }

    .modal-header {
        padding: 10px 12px;
    }

        .modal-header h3 {
            font-size: 0.9em;
            gap: 4px;
        }

    .close {
        width: 22px;
        height: 22px;
        font-size: 0.9em;
    }

    .seccion-modal {
        padding: 10px 12px;
    }

    .seccion-header {
        margin-bottom: 6px;
        padding-bottom: 3px;
    }

        .seccion-header i {
            width: 22px;
            height: 22px;
            padding: 4px;
            font-size: 0.8em;
            margin-right: 6px;
        }

        .seccion-header h4 {
            font-size: 0.85em;
        }

    .detalles-cita {
        gap: 4px;
    }

    .detalle-item {
        padding: 3px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1px;
        font-size: 0.75em;
    }

        .detalle-item:hover {
            margin: 0 -3px;
            padding: 3px;
        }

    .detalle-label {
        min-width: auto;
        font-size: 0.75em;
    }

    .detalle-valor {
        text-align: left;
        font-size: 0.8em;
    }

    .modalidad-opciones-modal {
        gap: 4px;
    }

    .modalidad-opcion-modal label {
        padding: 6px 8px;
        font-size: 0.75em;
    }

    .modalidad-icono {
        margin-right: 6px;
        font-size: 0.9em;
    }

    .modalidad-contenido strong {
        font-size: 0.85em;
    }

    .modalidad-contenido span {
        font-size: 0.75em;
    }

    .info-pago {
        margin-bottom: 8px;
        padding: 8px;
    }

    .total-pago {
        padding: 6px 8px;
        flex-direction: column;
        gap: 3px;
    }

    .total-label {
        font-size: 0.85em;
    }

    .total-monto {
        font-size: 1em;
    }

    .modal-actions {
        flex-direction: column;
        gap: 5px;
        padding: 10px 12px;
    }

    .btn {
        width: 100%;
        min-width: auto;
        padding: 8px 10px;
        font-size: 0.8em;
    }

    .opciones-pago {
        gap: 6px;
        margin-top: 8px;
    }

    .opcion-pago {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        padding: 6px 8px;
        font-size: 0.75em;
    }

    .opcion-icono {
        width: 24px;
        height: 24px;
        font-size: 1em;
    }

    .opcion-accion {
        width: 100%;
    }

        .opcion-accion .btn {
            width: 100%;
        }

    .seccion-metodo-pago {
        margin-top: 8px;
        padding: 8px;
        font-size: 0.75em;
    }

        .seccion-metodo-pago h5 {
            font-size: 0.9em;
            margin-bottom: 6px;
        }
}

@media (max-width: 480px) {
    .confirmar-cita-modal {
        margin: 0.5% auto;
        max-width: 98%;
        border-radius: 6px;
        max-height: 450px; /* Altura aún más reducida para móviles pequeños */
    }

    .modal-header {
        padding: 8px 10px;
    }

        .modal-header h3 {
            font-size: 0.85em;
        }

    .seccion-modal {
        padding: 8px 10px;
    }

    .pasos-container {
        min-height: 180px; /* Más reducida para móviles pequeños */
    }

    .total-pago {
        padding: 5px 6px;
    }

    .total-monto {
        font-size: 0.95em;
    }
}

/* Scrollbar mínimo */
.confirmar-cita-modal::-webkit-scrollbar {
    width: 2px;
}

.confirmar-cita-modal::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.confirmar-cita-modal::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 1px;
}

    .confirmar-cita-modal::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }















/* ============================ */
/* ESTILOS MEJORADOS PARA CELDAS OCUPADAS */
/* ============================ */

.celda-dia.ocupada {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    border-radius: 6px;
    margin: 1px;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
    transition: all 0.3s ease;
}

    .celda-dia.ocupada::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
        background-size: 200% 200%;
        animation: shimmer 2s infinite;
        opacity: 0.5;
    }

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.celda-dia.ocupada::after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    color: #f87171;
    opacity: 0.1;
    font-weight: bold;
}

.horario-ocupado {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2px;
    position: relative;
    z-index: 2;
}

    .horario-ocupado span {
        font-weight: 700;
        font-size: 0.75em;
        margin-bottom: 1px;
        color: #dc2626;
        text-decoration: line-through;
        position: relative;
    }

        .horario-ocupado span::before {
            content: '';
            position: absolute;
            top: 50%;
            left: -2px;
            right: -2px;
            height: 2px;
            background: linear-gradient(90deg, transparent, #dc2626, transparent);
            transform: translateY(-50%);
        }

    .horario-ocupado .estado {
        font-size: 0.5em;
        font-weight: 800;
        padding: 2px 4px;
        border-radius: 8px;
        display: inline-block;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        color: white;
        box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
        border: 1px solid rgba(255,255,255,0.2);
    }

/* Efecto hover sutil para indicar que no es seleccionable */
.celda-dia.ocupada:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    transform: none;
    box-shadow: 0 3px 6px rgba(239, 68, 68, 0.2);
}

    .celda-dia.ocupada:hover .horario-ocupado span {
        color: #b91c1c;
    }

    .celda-dia.ocupada:hover .horario-ocupado .estado {
        background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
        transform: scale(1.05);
    }

/* Indicador visual adicional */
.celda-dia.ocupada .indicador-ocupado {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #dc2626;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Tooltip informativo (opcional) */
.celda-dia.ocupada {
    position: relative;
}

    .celda-dia.ocupada:hover::before {
        animation-duration: 1s;
    }

/* Responsive para celdas ocupadas */
@media (max-width: 768px) {
    .celda-dia.ocupada {
        padding: 2px 1px;
    }

    .horario-ocupado span {
        font-size: 0.7em;
    }

    .horario-ocupado .estado {
        font-size: 0.45em;
        padding: 1px 3px;
    }

    .celda-dia.ocupada::after {
        font-size: 1.2em;
    }

    .celda-dia.ocupada .indicador-ocupado {
        width: 4px;
        height: 4px;
        top: 1px;
        right: 1px;
    }
}

/* Asegurar que los estados se muestren correctamente para todos los tipos */
.celda-dia.disponible .estado {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3);
    border: 1px solid rgba(255,255,255,0.2);
}

.celda-dia.disponible:hover .estado {
    background: white;
    color: #16a34a;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.4);
}

.celda-dia.no-disponible .estado {
    color: #94a3b8;
    background: transparent;
    box-shadow: none;
}

/* Contraste mejorado para mejor accesibilidad */
.celda-dia.ocupada {
    filter: saturate(1.1);
}

/* Efecto de profundidad para mejor jerarquía visual */
.celda-dia.ocupada {
    border-bottom: 3px solid #fecaca;
}

.celda-dia.disponible {
    border-bottom: 3px solid #bbf7d0;
}

.celda-dia.no-disponible {
    border-bottom: 3px solid #e2e8f0;
}


