/* Booking Steps */
.booking-steps {
    padding: 0 30px;
}

/* Spaziatura laterale per contenuto dopo il profilo */
.booking-content-row {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.booking-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

/* Connettore tra gli step (linea orizzontale) */
.booking-step::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e9ecef;
    z-index: -1;
    transition: background 0.3s ease;
}

/* Ferma il connettore sull'ultimo step visibile (prima della progress-bar) */
.booking-steps > .booking-step:nth-last-child(2)::after {
    content: none;
}

/* Connettore completato (step completato) */
.booking-step.completed::after {
    background: #198754;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.booking-step.active .step-icon {
    background: #00b5ac;
    color: white;
}

.booking-step.completed .step-icon {
    background: #198754;
    color: white;
}

.step-label {
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.booking-step.active .step-label,
.booking-step.completed .step-label {
    color: #00b5ac;
    font-weight: 600;
}

/* Manteniamo step-progress-bar per retrocompatibilità ma nascosta */
.step-progress-bar {
    display: none;
}

/* Exam cards */
.exam-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.exam-card:hover {
    border-color: #00b5ac;
    box-shadow: 0 2px 8px rgba(0, 181, 172, 0.15);
}

.exam-card.selected {
    border-color: #00b5ac;
    background-color: rgba(0, 181, 172, 0.05);
}

/* Badges */
#booking .badge {
    padding-top:10px;
    padding-bottom:10px;
    font-size:0.9em;
}


/* Time slots */
.time-slot-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.time-slot-card:hover {
    border-color: #00b5ac;
    transform: translateY(-2px);
}

.time-slot-card.selected {
    border-color: #00b5ac;
    background-color: rgba(0, 181, 172, 0.1);
}

/* Floating button */
.btn-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

/* Exam list container */
.exam-list-container::-webkit-scrollbar {
    width: 6px;
}

.exam-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.exam-list-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.exam-list-container::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Comune autocomplete dropdown */
#comune-suggestions {
    position: absolute;
    z-index: 1050;
}

#comune-suggestions .dropdown-item {
    cursor: pointer;
}

#comune-suggestions .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Form validation */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .booking-steps {
        padding: 0 10px;
    }
    
    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .step-label {
        font-size: 10px;
    }

    /* Connettore centrato sull'icona più piccola (40px / 2 = 20px) */
    .booking-step::after {
        top: 20px;
    }
}
/* Availability Calendar Styles */
.availability-calendar {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header h6 {
    margin: 0;
    font-weight: 600;
    text-transform: capitalize;
}

.calendar-nav {
    display: flex;
    gap: 5px;
}

.calendar-nav button {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav button:hover:not(:disabled) {
    background: #f8f9fa;
}

.calendar-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.calendar-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    padding: 5px;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    min-height: 50px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: #e9ecef;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.disabled {
    color: #dee2e6;
    cursor: not-allowed;
}

.calendar-day.available {
    background: #d4edda;
    color: #155724;
}

.calendar-day.available:hover {
    background: #c3e6cb;
}

.calendar-day.limited {
    background: #fff3cd;
    color: #856404;
}

.calendar-day.limited:hover {
    background: #ffeeba;
}

.calendar-day.unavailable {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.calendar-day.selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.calendar-day.today {
    font-weight: bold;
}

.calendar-day .day-number {
    font-size: 14px;
    font-weight: 500;
}

.calendar-day .day-slots {
    font-size: 9px;
    margin-top: 2px;
}

.calendar-day .day-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
}

.calendar-day.available .day-indicator {
    background: #28a745;
}

.calendar-day.limited .day-indicator {
    background: #ffc107;
}

/* Legend */
.calendar-legend {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}



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

.legend-dot.available {
    background: #28a745;
}

.legend-dot.limited {
    background: #ffc107;
}

.legend-dot.unavailable {
    background: #dee2e6;
}

/* Tooltip for calendar days */
.calendar-day-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-bottom: 5px;
}

.calendar-day-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.calendar-day:hover .calendar-day-tooltip {
    opacity: 1;
    visibility: visible;
}
/* Sub-step indicator (Step 5: Dati → Pagamento) */
.sub-step-indicator {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 25px;
}

.sub-step {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.sub-step.active {
    background: #00b5ac;
    color: white;
    font-weight: 600;
}

.sub-step.completed {
    background: #198754;
    color: white;
}

/* Payment Timer */
.payment-timer-container {
    display: flex;
    align-items: center;
}

.payment-timer-display {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
}

@keyframes timer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.timer-warning {
    animation: timer-pulse 1s infinite;
}

.timer-critical {
    color: #dc3545 !important;
    animation: timer-pulse 0.5s infinite;
}

/* Payment Card */
#card-number {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    letter-spacing: 2px;
}

#card-expiry,
#card-cvv {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Payment Processing Overlay */
.payment-processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: inherit;
}

/* Session Expired State */
.session-expired-icon {
    font-size: 64px;
    color: #dc3545;
}

/* Booking Receipt */
.booking-receipt {
    border: 2px dashed #28a745;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
    overflow: hidden;
}

.receipt-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.receipt-header .success-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.receipt-body {
    padding: 25px;
}

.receipt-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-item .label {
    color: #6c757d;
    font-size: 13px;
}

.receipt-item .value {
    font-weight: 600;
}

.receipt-total {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.transaction-id {
    font-family: 'Courier New', monospace;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.receipt-footer {
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Payment Summary Card */
.payment-summary-card .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.payment-summary-card .summary-row:last-child {
    border-bottom: none;
}

.payment-summary-card .summary-total {
    background: #f8f9fa;
    margin: 15px -1rem -1rem;
    padding: 15px 1rem;
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Card Brand Icons */
.card-brand-icon {
    font-size: 24px;
    transition: opacity 0.2s;
}

.card-brand-icon.detected {
    opacity: 1;
}

.card-brand-icon.undetected {
    opacity: 0.3;
}

/* Responsive adjustments for payment section */
@media (max-width: 768px) {
    .sub-step-indicator {
        padding: 8px 12px;
    }
    
    .sub-step {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .payment-timer-display {
        font-size: 1.5rem;
    }
    
    #card-number {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .receipt-header {
        padding: 20px;
    }
    
    .receipt-header .success-icon {
        font-size: 48px;
    }
}

/* Print styles for receipt */
@media print {
    .booking-receipt {
        border: 1px solid #000;
    }
    
    .receipt-header {
        background: #28a745 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .btn, .alert, .sub-step-indicator {
        display: none !important;
    }
}

/* =====================================================
   Doctor Filtering Styles
   Add these styles to booking.css
   ===================================================== */

/* Doctor List Panel */
.doctor-list-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.doctor-list-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.doctor-list-item.active {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.doctor-list-item .badge {
    min-width: 28px;
}

/* Active Filters Tags */
#active-filters-tags .badge {
    font-weight: normal;
    font-size: 0.75rem;
}

#active-filters-tags .badge i {
    font-size: 0.7rem;
}

/* Time Slot Card with Doctor Info */
.time-slot-card .text-info {
    font-size: 0.75rem;
}

/* Filter Panel */
#doctors-info-panel .list-group-item {
    border-left: 0;
    border-right: 0;
}

#doctors-info-panel .list-group-item:first-child {
    border-top: 0;
}

.calendar-day.loading-pending .day-slots {
    font-size: 10px;
    color: #6c757d;
}

.sede-card.sede2 {
    background-color: #2c4585;
    color:#fff;
}

.sede-card.sede1 {
    background-color: #376a9e;
}

.sede-card.sede4 {
    background-color: #223668;
}

.sede-card h5.card-title {
    color:#fff;
}
