.calendario-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendario-header {
    margin-bottom: 20px;
}

.color-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 5px;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #333;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.available {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.legend-dot.half-full {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.legend-dot.almost-full {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

.legend-dot.full {
    background: #6c757d;
}

.info-text {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

.calendario-wrapper {
    margin: 20px 0;
}

.calendario-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 3px;
    background-color: transparent;
    table-layout: fixed;
}

.calendario-table th,
.calendario-table td {
    padding: 8px 4px;
    text-align: center;
}

.time-header {
    background-color: transparent;
    width: 15%;
}

.day-header {
    background-color: #e9ecef;
    color: #333;
    font-weight: bold;
    border-radius: 5px;
    font-size: 14px;
    padding: 8px 4px;
}

.time-label {
    background-color: #e9ecef;
    color: #333;
    font-weight: bold;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 4px;
}

.calendario-cell {
    padding: 3px;
}

.time-slot {
    min-height: 50px;
    border-radius: 6px;
    padding: 10px 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
}

.time-slot.available {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.time-slot.half-full {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
}

.time-slot.almost-full {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

.time-slot.full {
    background: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

.time-slot.unavailable {
    background: #e9ecef;
    color: #6c757d;
    cursor: default;
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Estilo especial para casillas deshabilitadas por error de conexión */
.time-slot.connection-disabled {
    background: repeating-linear-gradient(
        45deg,
        #d3d3d3,
        #d3d3d3 10px,
        #c0c0c0 10px,
        #c0c0c0 20px
    );
    color: #888;
    cursor: not-allowed;
    opacity: 0.5;
    font-weight: normal;
}

.time-slot.connection-disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* Efecto visual cuando el calendario tiene error de conexión */
.calendario-container.connection-error {
    opacity: 0.8;
    filter: grayscale(0.3);
}

.time-slot:not(.disabled):not(.full):not(.unavailable):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.time-slot.selected {
    border: 2px solid #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.priority-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.slot-status-text {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.selected-summary {
    margin-top: 25px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.selected-summary h5 {
    margin-bottom: 15px;
    color: #333;
}

.selected-slots-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.selected-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #e9ecef;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

.selected-priority {
    width: 20px;
    height: 20px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.selected-text {
    font-size: 14px;
    color: #333;
}

.slot-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.slot-modal.show {
    display: block;
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    color: #333;
}

/* Estilos para dark-theme - mantener apariencia del tema claro */
body.dark-theme .modal-content {
    background-color: #ffffff;
    color: #333 !important;
}

body.dark-theme .modal-content h3,
body.dark-theme .modal-content h4 {
    color: #333 !important;
}

body.dark-theme .modal-info-item {
    background-color: #f8f9fa;
    color: #333;
}

body.dark-theme .modal-info-item span {
    color: #333;
}

body.dark-theme .modal-close {
    color: #aaa;
}

body.dark-theme .modal-close:hover {
    color: #000;
}

.slot-modal.bottom-sheet .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: auto;
    right: auto;
    margin: 0;
    border-radius: 15px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
    width: 90%;
    padding: 20px 15px;
}

.slot-modal.bottom-sheet .modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.slot-modal.bottom-sheet .modal-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.slot-modal.bottom-sheet .modal-info-grid {
    gap: 8px;
    margin-top: 10px;
}

.slot-modal.bottom-sheet .modal-info-item {
    padding: 8px;
    font-size: 0.9rem;
}

.slot-modal.bottom-sheet .modal-icon {
    font-size: 18px;
}

.slot-modal.bottom-sheet .modal-actions {
    margin-top: 15px;
    padding-top: 15px;
}

.slot-modal.bottom-sheet .modal-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #000;
}

.modal-info-grid {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.modal-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.modal-icon {
    font-size: 24px;
}

.modal-actions {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.modal-actions .btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
}

.modal-actions .btn-primary {
    background-color: #0d6efd;
    color: white;
}

.modal-actions .btn-primary:hover {
    background-color: #0b5ed7;
}

.modal-actions .btn-danger {
    background-color: #dc3545;
    color: white;
}

.modal-actions .btn-danger:hover {
    background-color: #bb2d3b;
}

@media (max-width: 767px) {
    .calendario-container {
        padding: 5px;
    }
    
    .calendario-table {
        border-spacing: 2px;
    }
    
    .calendario-table th,
    .calendario-table td {
        padding: 3px 2px;
    }
    
    .time-label {
        font-size: 10px;
        padding: 5px 2px;
    }
    
    .day-header {
        font-size: 11px;
        padding: 5px 2px;
    }
    
    .time-slot {
        min-height: 35px;
        padding: 5px 2px;
        font-size: 10px;
    }
    
    .slot-status-text {
        font-size: 9px;
    }
    
    .priority-badge {
        width: 16px;
        height: 16px;
        font-size: 8px;
        top: -5px;
        right: -5px;
    }
    
    .color-legend {
        font-size: 12px;
        gap: 8px;
    }
    
    .legend-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .time-header {
        width: 20%;
    }
    
    .day-header {
        font-size: 10px;
        padding: 4px 1px;
    }
    
    .time-label {
        font-size: 9px;
        padding: 4px 1px;
    }
}