/* Reusable "closed time slot" picker component (see
   static/js/time_slot_picker.js). Deliberately generic/self-contained so it
   can be dropped into any screen that needs "pick a day, click a slot"
   scheduling, not just the appointment form. */

.time-slot-picker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #fafafa;
}

.time-slot-picker-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.time-slot-picker-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #374151;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.time-slot-picker-nav-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.time-slot-picker-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    text-align: center;
}

.time-slot-picker-date-label {
    font-weight: 600;
    color: #111827;
    text-transform: capitalize;
}

.time-slot-picker-custom-btn {
    border: none;
    background: none;
    color: #2563eb;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.time-slot-picker-custom-btn:hover {
    color: #1d4ed8;
}

.time-slot-picker-custom-input {
    margin-top: 0.25rem;
}

.time-slot-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: 0.5rem;
    min-height: 2.5rem;
}

.time-slot-button {
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background-color: #ffffff;
    color: #111827;
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.time-slot-button:hover {
    background-color: #eff6ff;
    border-color: #93c5fd;
}

.time-slot-button-selected {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.time-slot-button-selected:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.time-slot-picker-status {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
}

/* Dark theme overrides — only applied when an ancestor <html> carries
   `data-theme="dark"` (set on the public storefront layout only; see
   `layouts/public_booking.html` and `public_booking.css`). The dashboard
   never sets this attribute, so these rules have no effect there even
   though this component is shared between both surfaces. */
/* Dark theme overrides — only applied when an ancestor <html> carries
   `data-theme="dark"` (set on the public storefront layout only; see
   `layouts/public_booking.html` and `public_booking.css`, which also
   define the `--dark-*` custom properties used below). The dashboard
   never sets this attribute, so these rules have no effect there even
   though this component is shared between both surfaces. */
[data-theme="dark"] .time-slot-picker {
    border-color: var(--dark-border, #333338);
    background-color: var(--dark-surface, #1c1c1f);
}

[data-theme="dark"] .time-slot-picker-nav-btn {
    border-color: var(--dark-border, #333338);
    background-color: var(--dark-surface-raised, #232327);
    color: #e4e4e7;
}

[data-theme="dark"] .time-slot-picker-nav-btn:hover {
    background-color: var(--dark-hover-strong, #333338);
    border-color: #52525b;
}

[data-theme="dark"] .time-slot-picker-date-label {
    color: var(--dark-text, #f4f4f5);
}

[data-theme="dark"] .time-slot-picker-status {
    color: var(--dark-text-muted, #a1a1aa);
}

[data-theme="dark"] .time-slot-button {
    border-color: var(--dark-border, #333338);
    background-color: var(--dark-surface-raised, #232327);
    color: #e4e4e7;
}

[data-theme="dark"] .time-slot-button:hover {
    background-color: var(--dark-hover-strong, #333338);
    border-color: #52525b;
}

[data-theme="dark"] .time-slot-button-selected {
    color: #ffffff;
}


