@import url('tokens.css');
/*
 * book.css
 * Modern white calendar booking page
 */

.book-container {
    display: flex;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 860px;
    min-height: 520px;
}

/* Left Panel - Calendar */
.book-calendar-panel {
    flex: 1;
    padding: 40px 36px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F3F4F6;
    border: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.book-avatar svg {
    width: 28px;
    height: 28px;
    color: #6B7280;
}

.book-meet-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.book-month-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    user-select: none;
}

.book-nav-button {
    background: none;
    border: none;
    color: #0EA5E9;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.book-nav-button:hover {
    background-color: #F0F9FF;
}

.book-month-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0EA5E9;
}

.book-cal-grid {
    width: 100%;
    max-width: 320px;
}

.book-cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.book-cal-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.book-cal-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.15s, color 0.15s;
    position: relative;
}

.book-cal-cell:hover:not(.past):not(.empty):not(.selected) {
    background-color: #F3F4F6;
}

.book-cal-cell.past {
    color: #D1D5DB;
    cursor: default;
    pointer-events: none;
}

.book-cal-cell.empty {
    cursor: default;
    pointer-events: none;
}

.book-cal-cell.today:not(.selected) {
    background-color: #E0F2FE;
    color: #0369A1;
    font-weight: 700;
}

.book-cal-cell.selected {
    background-color: #0EA5E9;
    color: #FFFFFF;
    font-weight: 700;
}

/* Right Panel - Booking Options */
.book-options-panel {
    flex: 1;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
}

.book-duration-label {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.book-duration-group {
    display: flex;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 28px;
}

.book-duration-button {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4B5563;
    border-right: 1px solid #D1D5DB;
    transition: background-color 0.15s, color 0.15s;
}

.book-duration-button:last-child {
    border-right: none;
}

.book-duration-button:hover:not(.active) {
    background-color: #F9FAFB;
}

.book-duration-button.active {
    background-color: var(--text-primary);
    color: #FFFFFF;
    font-weight: 600;
}

.book-time-label {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.book-time-sublabel {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 10px;
}

.book-timezone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0D9488;
    font-size: 0.8125rem;
    margin-bottom: 20px;
    cursor: default;
}

.book-timezone svg {
    width: 14px;
    height: 14px;
}

.book-time-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    max-height: 280px;
    padding-right: 4px;
}

.book-time-slot {
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.book-time-slot:hover {
    border-color: #0EA5E9;
    color: #0EA5E9;
    background-color: #F0F9FF;
}

.book-time-slot.selected {
    border-color: #0EA5E9;
    background-color: #0EA5E9;
    color: #FFFFFF;
}

.book-time-slots.hidden {
    display: none;
}

.book-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #9CA3AF;
    font-size: 0.875rem;
    text-align: center;
    gap: 8px;
}

.book-empty-state.hidden {
    display: none;
}

.book-empty-state svg {
    width: 40px;
    height: 40px;
    color: #D1D5DB;
}

/* Scrollbar */
.book-time-slots::-webkit-scrollbar {
    width: 4px;
}

.book-time-slots::-webkit-scrollbar-track {
    background: transparent;
}

.book-time-slots::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.book-submit-button {
    width: 100%;
    padding: 14px;
    background-color: #0EA5E9;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.book-submit-button:hover {
    background-color: #0284C7;
}

@media (max-width: 768px) {
    .book-container {
        flex-direction: column;
    }

    .book-calendar-panel {
        border-right: none;
        border-bottom: 1px solid #E5E7EB;
    }
}

/* ── Dark Mode ────────────────────────────────────────────── */
html.dark-mode {
    --book-accent: #38bdf8;
    --book-accent-dim: rgba(14, 165, 233, 0.15);
}

html.dark-mode .book-container {
    background: #111111;
    border: 1px solid #222222;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

html.dark-mode .book-calendar-panel {
    border-right-color: #222222;
}

html.dark-mode .book-avatar {
    background: #1a1a1a;
    border-color: #222222;
}

html.dark-mode .book-avatar svg {
    color: #94a3b8;
}

html.dark-mode .book-meet-label,
html.dark-mode .book-duration-label,
html.dark-mode .book-time-label {
    color: #f1f5f9;
}

html.dark-mode .book-month-title,
html.dark-mode .book-nav-button {
    color: #f1f5f9;
}

html.dark-mode .book-cal-cell {
    color: #cbd5e1;
}

html.dark-mode .book-cal-cell:hover:not(.past):not(.empty):not(.selected) {
    background-color: #222222;
}

html.dark-mode .book-cal-cell.past {
    color: #444444;
}

html.dark-mode .book-cal-cell.today:not(.selected) {
    background-color: var(--book-accent-dim);
    color: var(--book-accent);
}

html.dark-mode .book-duration-group {
    border-color: #333333;
}

html.dark-mode .book-duration-button {
    background: #111111;
    color: #94a3b8;
    border-right-color: #333333;
}

html.dark-mode .book-duration-button:hover:not(.active) {
    background-color: #222222;
}

html.dark-mode .book-duration-button.active {
    background-color: #f1f5f9;
    color: #000000;
}

html.dark-mode .book-time-sublabel,
html.dark-mode .book-empty-state {
    color: #94a3b8;
}

html.dark-mode .book-time-slot {
    background: #111111;
    border-color: #222222;
    color: #cbd5e1;
}

html.dark-mode .book-time-slot:hover {
    border-color: #f1f5f9;
    color: #f1f5f9;
    background-color: #1a1a1a;
}

html.dark-mode .book-time-slot.selected {
    background-color: #f1f5f9;
    color: #000000;
    border-color: #f1f5f9;
}

html.dark-mode .book-time-slots::-webkit-scrollbar-thumb {
    background: #333333;
}

@media (max-width: 768px) {
    html.dark-mode .book-calendar-panel {
        border-bottom-color: #334155;
    }
}

