/**
 * CSS per funzionalità Multi-Slot del nuovo calendario
 * @package Prenotazione_Aule_SSM
 * @version 1.0.0
 */

/* ========================================
   MODALE SELEZIONE SLOT
   ======================================== */

.modal-dialog.modal-lg {
    max-width: 700px;
}

.selected-date-info {
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.selected-date-info strong {
    color: #1f2937;
    margin-right: 8px;
}

/* Grid Badge Slot Disponibili */
.available-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.slot-badge-selectable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    color: #e5e5e5;
}

.slot-badge-selectable .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-bottom: 4px;
    color: #e5e5e5;
}

.slot-badge-selectable:hover:not(:disabled) {
    border-color: #b64c3c;
    background: #fdf0ef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(182, 76, 60, 0.15);
}

.slot-badge-selectable.slot-selected {
    background: #f5aca1;
    border-color: #b64c3c;
    color: white;
}

.slot-badge-selectable.slot-selected .dashicons {
    color: white;
}

.slot-badge-selectable.slot-booked {
    background: #fef3f2;
    border-color: #fecdca;
    color: #991b1b;
    cursor: not-allowed;
    opacity: 0.7;
}

.slot-badge-selectable.slot-booked small {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    font-weight: normal;
    color: #7f1d1d;
}

.modal-loading {
    padding: 40px 20px;
}

.modal-empty {
    padding: 40px 20px;
}

.modal-selected-count {
    margin-top: 20px;
}

.modal-selected-count .pas-alert-info {
    margin: 0;
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #075985;
}

/* ========================================
   SIDEBAR SLOT SELEZIONATI
   ======================================== */

.slots-column {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.selected-slots-widget {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.selected-slots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.selected-slots-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-slots-title .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #b64c3c;
}

.pas-btn-clear-all {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pas-btn-clear-all:hover {
    background: #fef2f2;
}

.pas-btn-clear-all .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.selected-slots-list {
    max-height: 300px;
    overflow-y: auto;
}

.slot-date-group {
    margin-bottom: 12px;
}

.slot-date-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.slot-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.selected-slot-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 13px;
    color: #075985;
    font-weight: 500;
}

.selected-slot-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #0284c7;
}

.slot-time-text {
    font-family: 'Courier New', monospace;
}

.remove-selected-slot {
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #dc3545;
    transition: all 0.2s ease;
    border-radius: 3px;
    margin-left: 2px;
}

.remove-selected-slot:hover {
    background: #fef2f2;
}

.remove-selected-slot .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ========================================
   FORM PRENOTAZIONE MULTIPLA
   ======================================== */

.booking-form-widget {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.multi-slot-booking-form .form-group {
    margin-bottom: 16px;
}

.multi-slot-booking-form .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.multi-slot-booking-form .required {
    color: #dc3545;
}

.multi-slot-booking-form .pas-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.multi-slot-booking-form .pas-form-control:focus {
    outline: none;
    border-color: #b64c3c;
    box-shadow: 0 0 0 3px rgba(182, 76, 60, 0.1);
}

.multi-slot-booking-form textarea.pas-form-control {
    resize: vertical;
    min-height: 80px;
}

.multi-slot-booking-form .form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
}

/* Form Styling - Checkbox Fix (WP Aule Booking Solution) */
.multi-slot-booking-form .form-check input[type="checkbox"].form-check-input {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    margin-top: 3px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid #d1d5db !important;
    border-radius: 4px !important;
    accent-color: #b64c3c !important;
}

.multi-slot-booking-form .form-check input[type="checkbox"].form-check-input:checked {
    background-color: #b64c3c !important;
    border-color: #b64c3c !important;
}

.multi-slot-booking-form .form-check input[type="checkbox"].form-check-input:focus {
    outline: 2px solid #b64c3c !important;
    outline-offset: 2px !important;
}

.multi-slot-booking-form .form-check input[type="checkbox"].form-check-input.is-invalid {
    outline: 2px solid #dc3545 !important;
}
.multi-slot-booking-form .form-check-label {
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1.5;
}

.pas-btn-submit-multi-booking {
    width: 100%;
    padding: 12px 16px;
    background: #b64c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pas-btn-submit-multi-booking:hover:not(:disabled) {
    background: #9a3d31;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 76, 60, 0.3);
}

.pas-btn-submit-multi-booking:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pas-btn-submit-multi-booking .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pas-btn-submit-multi-booking .pas-btn-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.multi-slot-booking-form .pas-alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 16px;
}

.multi-slot-booking-form .pas-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.multi-slot-booking-form .pas-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ========================================
   CALENDARIO CON INDICATORI
   ======================================== */

.calendar-day.has-selected {
    background: #dbeafe;
    border-color: #60a5fa;
}

.calendar-day.has-selected .day-number {
    color: #1e40af;
    font-weight: 600;
}

.calendar-day.has-selected::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.slots-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.slots-empty-state .empty-icon {
    margin-bottom: 16px;
}

.slots-empty-state .empty-icon .dashicons {
    color: #d1d5db;
}

.slots-empty-state .empty-message {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .available-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .slot-badge-selectable {
        padding: 10px 6px;
        font-size: 13px;
        min-height: 50px;
    }

    .selected-slots-widget,
    .booking-form-widget {
        padding: 12px;
    }

    .selected-slots-title {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .available-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
