/* Schedule Grid Mobile Optimization */
.schedule-grid {
    display: flex;
    gap: 1px;
    background: #dee2e6;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.employee-column {
    flex: 1;
    min-width: 220px;
    background: white;
    padding: 6px;
}

.employee-header {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 5px;
    border-radius: 4px;
    margin-bottom: 5px;
    text-align: center;
    background-color: #f8f9fa !important; /* Light gray background for all headers */
    border: 1px solid #dee2e6;
}

.time-slot {
    /* No min-height - height is controlled by inline style from API */
    padding: 5px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 0.8rem;
    overflow: hidden; /* Force content to be cut if it exceeds height */
    box-sizing: border-box;
}

.free-slot {
    background-color: #d4edda !important; /* Light green for free slots */
    border: 1px solid #c3e6cb !important;
}

.appointment-slot {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid;
}

    .appointment-slot:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    .appointment-slot:active {
        transform: translateY(0);
    }

/* Compact header spacing */
.container-fluid {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

h2 {
    font-size: 1.4rem;
    margin: 0;
}

/* Reduce spacing before schedule */
.d-flex.justify-content-between {
    margin-bottom: 8px !important;
}

.d-flex.justify-content-center {
    margin-bottom: 8px !important;
}

/* Navigation toolbar */
.btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

    .btn-toolbar .btn-group {
        flex-shrink: 0;
    }

/* Mobile-specific styles */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-top: 4px !important;
    }

    .employee-column {
        min-width: 200px;
        padding: 5px;
    }

    .employee-header {
        font-size: 0.85rem;
        padding: 4px;
        margin-bottom: 4px;
    }

    .time-slot {
        font-size: 0.75rem;
        padding: 4px;
    }

    /* Stack navigation buttons vertically on mobile */
    .btn-toolbar {
        flex-direction: column;
        gap: 0.5rem !important;
        width: 100%;
    }

        .btn-toolbar .btn-group {
            width: 100%;
            max-width: 400px;
        }

            .btn-toolbar .btn-group input[type="date"] {
                flex: 1;
            }

        .btn-toolbar > button {
            width: 100%;
            max-width: 400px;
        }

    /* Improve button touch targets on mobile */
    .btn {
        min-height: 44px;
    }

    h2 {
        font-size: 1.2rem;
    }

    .d-flex.justify-content-between,
    .d-flex.justify-content-center {
        margin-bottom: 6px !important;
    }
}

/* iPhone specific optimizations */
@media (max-width: 428px) {
    h2 {
        font-size: 1.1rem;
    }

    .schedule-grid {
        gap: 0;
    }

    .employee-column {
        min-width: 180px;
        padding: 4px;
    }

    .employee-header {
        font-size: 0.8rem;
        padding: 3px;
    }

    .badge {
        font-size: 0.65rem;
        padding: 1px 3px;
    }

    .btn-toolbar .btn-group,
    .btn-toolbar > button {
        max-width: 100%;
    }

    .d-flex.justify-content-between,
    .d-flex.justify-content-center {
        margin-bottom: 4px !important;
    }
}

/* Status colors */
.status-canceled {
    border-left: 4px solid #dc3545;
}

.status-no-show {
    border-left: 4px solid #ffc107;
}

.status-upcoming {
    border-left: 4px solid #28a745;
}

.status-paid {
    background-color: #d4edda;
}

/* Scrollbar styling for webkit browsers */
.schedule-grid::-webkit-scrollbar {
    height: 8px;
}

.schedule-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.schedule-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    .schedule-grid::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
