/* ==========================================================================
   Calendar Slots Page Styles
   ========================================================================== */

/* Service Header */
.service-header {
    background: linear-gradient(135deg, var(--service-color, #007bff)20, var(--service-color, #007bff)40);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    color: white;
    border-radius: 20px;
    font-weight: 500;
}

/* Date Form */
.date-form {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Quick date shortcuts */
.date-quick-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.date-quick-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-color, #333);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.date-quick-pick:hover:not(:disabled):not(.active) {
    background-color: color-mix(in srgb, var(--primary-color) 10%, white);
    border-color: color-mix(in srgb, var(--primary-color) 35%, white);
    color: var(--primary-color);
}

.date-quick-pick.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.date-quick-pick:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.date-quick-pick__label {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.date-quick-pick__date {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 0.15rem;
}

.date-quick-pick.active .date-quick-pick__date {
    opacity: 0.95;
}

@media (max-width: 768px) {
    .date-quick-picks {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
    }

    .date-quick-pick {
        flex-shrink: 0;
        min-width: 4.25rem;
        padding: 0.45rem 0.6rem;
    }
}

/* Tab Navigation */
.nav-scroll-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.nav-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    padding: 0.5rem 0;
    list-style: none !important;
    margin: 0 !important;
}

.nav-pills .nav-item {
    flex-shrink: 0;
    margin-right: 0.5rem;
    list-style: none !important;
}

.nav-pills .nav-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    min-width: 100px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    white-space: nowrap;
    text-decoration: none;
    background: transparent;
}

.nav-pills .nav-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.nav-pills .nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Tab Content */
.nav-pills .nav-link .fs-4 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.nav-pills .nav-link .tab-text {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
}

/* Tab Panes */
.tab-content {
    margin-top: 1rem;
}

.tab-pane {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-pane.show {
    opacity: 1;
}

.tab-pane.fade {
    transition: opacity 0.3s ease;
}

/* Form Controls */
.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1.125rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

/* Grid Spacing */
.row.g-2 > * {
    padding: 0.5rem;
}

/* Slots Section */
.slots-section h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.alert-info h3 {
    color: #0c5460;
    margin-bottom: 0.5rem;
}

/* Custom Calendar Styles */
.custom-calendar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    min-width: 280px;
}

.custom-calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 10px;
}

.custom-calendar .day-header {
    font-weight: bold;
    text-align: center;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 2px;
    font-size: 0.875rem;
}

.custom-calendar .day-cell {
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.875rem;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-calendar .day-cell.available {
    background: #e7f5ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
}

.custom-calendar .day-cell.available:hover {
    background: #0066cc;
    color: white;
}

.custom-calendar .day-cell.unavailable {
    color: #ccc;
    cursor: not-allowed;
    background: #f8f9fa;
}

.custom-calendar .day-cell.selected {
    background: #0066cc;
    color: white;
    font-weight: bold;
}

.custom-calendar .month-header {
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.custom-calendar .month-header:hover {
    background: #e9ecef;
}

.custom-calendar .nav-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
}

.date-input-wrapper {
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
    .service-header {
        padding: 1.5rem;
    }
    
    .date-form {
        padding: 1rem;
    }
    
    .nav-pills .nav-link {
        min-width: 80px;
        padding: 0.4rem 0.8rem;
    }
    
    .nav-pills .nav-link .fs-4 {
        font-size: 1.25rem;
    }
    
    .nav-pills .nav-link .tab-text {
        font-size: 0.75rem;
    }
}
