/* ── Book Appointment Page Styles ────────────────────────────────────── */
:root {
    --book-bg: #0a0a0a;
    --book-bg-secondary: #111111;
    --book-bg-tertiary: #1a1a1a;
    --book-bg-elevated: #222222;
    --book-border: #333333;
    --book-border-subtle: #222222;
    --book-text: #ffffff;
    --book-text-secondary: #cccccc;
    --book-text-muted: #888888;
    --book-text-disabled: #666666;
    --book-accent: #4D7CFD;
    --book-accent-hover: #7a9fff;
    --book-accent-dim: rgba(77, 124, 253, 0.1);
    --book-accent-border: rgba(77, 124, 253, 0.3);
    --book-success: #00cc66;
    --book-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="light"] {
    --book-bg: #ffffff;
    --book-bg-secondary: #f8f9fa;
    --book-bg-tertiary: #e9ecef;
    --book-bg-elevated: #ffffff;
    --book-border: #ced4da;
    --book-border-subtle: #dee2e6;
    --book-text: #212529;
    --book-text-secondary: #343a40;
    --book-text-muted: #6c757d;
    --book-text-disabled: #adb5bd;
    --book-accent: #4D7CFD;
    --book-accent-hover: #3D63CA;
    --book-accent-dim: rgba(77, 124, 253, 0.07);
    --book-accent-border: rgba(77, 124, 253, 0.25);
    --book-success: #16a34a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--book-font);
    background: var(--book-bg);
    color: var(--book-text);
    min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.book-header {
    background: var(--book-bg-secondary);
    border-bottom: 1px solid var(--book-border-subtle);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
}

.book-header-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.book-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.book-logo-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    object-fit: contain;
}

.book-logo-text {
    font-weight: 700; font-size: 18px; color: var(--book-text);
}

.book-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--book-text-muted);
}

.book-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--book-bg-tertiary);
    border: 1px solid var(--book-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--book-text-secondary);
}

.book-header-user i { font-size: 16px; color: var(--book-accent); }

/* ── Main ───────────────────────────────────────────────────────────── */
.book-main {
    padding: 40px 24px 80px;
}

.book-container {
    max-width: 1100px;
    margin: 0 auto;
}

.book-title-section {
    margin-bottom: 32px;
}

.book-title-section h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.book-title-section p {
    font-size: 15px;
    color: var(--book-text-muted);
}

/* ── Content (calendar + slots) ─────────────────────────────────────── */
.book-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: flex-start;
}

/* ── Calendar Card ──────────────────────────────────────────────────── */
.book-calendar-card {
    background: var(--book-bg-secondary);
    border: 1px solid var(--book-border-subtle);
    border-radius: 14px;
    padding: 24px;
}

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

.book-calendar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.cal-nav-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid var(--book-border);
    background: var(--book-bg-tertiary);
    color: var(--book-text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    transition: all 0.15s;
}
.cal-nav-btn:hover {
    background: var(--book-bg-elevated);
    color: var(--book-text);
}

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

.cal-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--book-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
}

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

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--book-text-disabled);
    cursor: default;
    transition: all 0.15s;
    position: relative;
}

.cal-day.other-month {
    color: var(--book-text-disabled);
    opacity: 0.3;
}

.cal-day.today {
    border: 1px solid var(--book-border);
}

.cal-day.has-slots {
    color: var(--book-text);
    cursor: pointer;
    background: var(--book-accent-dim);
    border: 1px solid var(--book-accent-border);
}

.cal-day.has-slots:hover {
    background: rgba(77, 124, 253, 0.2);
}

.cal-day.selected {
    background: var(--book-accent) !important;
    color: #fff !important;
    border-color: var(--book-accent) !important;
}

.cal-day .slot-dot {
    position: absolute;
    bottom: 4px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--book-accent);
}

/* ── Slots Panel ────────────────────────────────────────────────────── */
.book-slots-card {
    background: var(--book-bg-secondary);
    border: 1px solid var(--book-border-subtle);
    border-radius: 14px;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.book-slots-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--book-border-subtle);
}

.book-slots-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.book-slots-body {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-slots-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--book-text-muted);
    text-align: center;
    gap: 12px;
    padding: 40px 0;
}

.book-slots-empty i {
    font-size: 48px;
    opacity: 0.3;
}

.book-slots-empty p {
    font-size: 14px;
    max-width: 220px;
}

.book-slots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--book-bg-tertiary);
    border: 1px solid var(--book-border);
    border-radius: 10px;
    transition: all 0.15s;
    cursor: pointer;
}

.slot-item:hover {
    border-color: var(--book-accent-border);
    background: var(--book-accent-dim);
}

.slot-time {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
}

.slot-time i {
    color: var(--book-accent);
    font-size: 18px;
}

.slot-book-btn {
    padding: 6px 16px;
    border-radius: 8px;
    background: var(--book-accent);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--book-font);
    transition: all 0.15s;
}

.slot-book-btn:hover {
    background: var(--book-accent-hover);
}

.no-slots-msg {
    text-align: center;
    padding: 40px 0;
    color: var(--book-text-muted);
    font-size: 14px;
}

/* ── Modal / Overlay ────────────────────────────────────────────────── */
.book-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.book-modal {
    background: var(--book-bg-secondary);
    border: 1px solid var(--book-border);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
}

.book-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--book-border-subtle);
}

.book-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.book-modal-close {
    background: none;
    border: none;
    color: var(--book-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.book-modal-close:hover {
    color: var(--book-text);
}

.book-modal-body {
    padding: 24px;
}

.book-slot-summary {
    background: var(--book-bg-tertiary);
    border: 1px solid var(--book-border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--book-text-secondary);
}

.book-slot-summary i {
    font-size: 22px;
    color: var(--book-accent);
}

.book-form-group {
    margin-bottom: 16px;
}

.book-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--book-text-secondary);
    margin-bottom: 6px;
}

.book-form-group .optional {
    color: var(--book-text-disabled);
    font-weight: 400;
}

.book-form-group input,
.book-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--book-bg-tertiary);
    border: 1px solid var(--book-border);
    border-radius: 8px;
    color: var(--book-text);
    font-size: 14px;
    font-family: var(--book-font);
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}

.book-form-group input:focus,
.book-form-group textarea:focus {
    border-color: var(--book-accent);
    box-shadow: 0 0 0 2px var(--book-accent-dim);
}

.book-form-group input:read-only {
    opacity: 0.7;
    cursor: not-allowed;
}

.book-form-error {
    color: #cc0000;
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 8px;
}

.book-btn-primary {
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--book-accent);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--book-font);
    cursor: pointer;
    transition: all 0.15s;
}

.book-btn-primary:hover {
    background: var(--book-accent-hover);
}

.book-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success modal */
.book-modal-success {
    text-align: center;
    padding: 40px 32px;
}

.book-success-icon {
    font-size: 56px;
    color: var(--book-success);
    margin-bottom: 16px;
}

.book-modal-success h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.book-modal-success p {
    font-size: 14px;
    color: var(--book-text-muted);
    margin-bottom: 24px;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 800px) {
    .book-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .book-title-section h1 { font-size: 22px; }
    .book-calendar-card { padding: 16px; }
    .book-modal { border-radius: 12px; }
}
