/* ── Calendar / Bookings page — Anthropic refinement ── */

/* ── View tabs (Calendar / List / History) — underline style ── */
.cal-view-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.cal-view-tab {
    padding: 0.5rem 1rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 450;
    color: #a8a29e;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    position: relative;
    bottom: -1px;
}
.cal-view-tab:hover {
    color: #1c1917;
}
.cal-view-tab.active {
    color: #1c1917;
    font-weight: 550;
    border-bottom-color: #1c1917;
}

/* ── Sync button — quiet text link ── */
.cal-sync-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0;
    font-size: 0.8125rem;
    font-weight: 450;
    color: #a8a29e;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}
.cal-sync-link:hover {
    color: #1c1917;
}

/* ── Filter tabs (All / Completed / etc.) — plain text style ── */
.cal-filter-tabs {
    display: flex;
    gap: 0.125rem;
}
.cal-filter-tab {
    padding: 0.3rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 450;
    color: #78716c;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.cal-filter-tab:hover {
    color: #1c1917;
    background: rgba(0, 0, 0, 0.04);
}
.cal-filter-tab.active {
    color: #1c1917;
    font-weight: 550;
    background: rgba(0, 0, 0, 0.06);
}

/* ── Calendar grid cells ── */
.cal-fixed-cell {
    background: transparent !important;
}
.cal-fixed-cell:not(.empty):hover {
    background: #f5f5f5 !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
}
.cal-fixed-cell.empty {
    background: #fafafa !important;
}
.cal-fixed-cell.today {
    background: #f5f5f5 !important;
    border: 2px solid #111 !important;
}

/* ── Today badge ── */
.cal-day-number.is-today {
    background: #111 !important;
    color: white !important;
}

/* ── Booking chips ── */
.cal-booking-chip:hover {
    background: #f5f5f5 !important;
}
.cal-chip-time {
    color: #111 !important;
}

/* ── Day popup ── */
.cal-day-popup-content {
    background: #fff !important;
}
.cal-popup-job {
    background: #fafafa !important;
}
.cal-popup-job:hover {
    background: #f5f5f5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* ── Calendar legend ── */
.cal-legend {
    color: #555 !important;
}

/* ── Calendar header card ── */
.cal-header {
    border-bottom-color: #e2e2e2 !important;
}

/* ── Booking list items ── */
.booking-list-item {
    background: transparent !important;
    border-color: #e2e2e2 !important;
}
.booking-list-item:hover {
    border-color: #111 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
}

/* ── Booking item (old calendar) ── */
.booking-item {
    background: #f5f5f5 !important;
    border-left-color: #111 !important;
}

/* ── KPI cards on bookings page ── */
.kpi-card {
    background: transparent !important;
    border: 1px solid #e2e2e2 !important;
}
.kpi-change.positive {
    color: #16a34a !important;
}

/* ── View toggle (.btn-group active) ── */
.btn-group .btn.btn-primary {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

/* ── Filter bar card ── */
.card {
    /* Only scope to bookings page context; use specificity */
}

/* ── Booking detail page (bdp) ── */
.bdp {
    max-width: 860px;
    margin: 0 auto;
}

/* Alert: blue → monochrome */
.bdp-alert-blue {
    background: #f5f5f5 !important;
    border-color: #e2e2e2 !important;
    color: #111 !important;
}

/* Textarea focus */
.bdp-textarea:focus {
    border-color: #111 !important;
    box-shadow: 0 0 0 3px rgba(17,17,17,0.08) !important;
}

/* Quick action links */
.bdp-quick-action:hover {
    border-color: #111 !important;
    color: #111 !important;
}

/* Detail cards */
.bdp-card {
    background: transparent !important;
    border-color: #e2e2e2 !important;
}

/* Transcript bubbles */
.bdp-msg-ai .bdp-msg-bubble {
    background: #f5f5f5 !important;
    border-color: #e2e2e2 !important;
}

/* ── Booking list item (bli-*) — class-based layout ── */
.bli-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.bli-time {
    min-width: 80px;
    text-align: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: #111;
}
.bli-time--past { color: var(--gray-400); }
.bli-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    background: #f5f5f5;
    color: #111;
    flex-shrink: 0;
}
.bli-avatar--past { background: var(--gray-200); color: var(--gray-500); }
.bli-info {
    flex: 1;
    min-width: 0;
}
.bli-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-900);
}
.bli-name--past { color: var(--gray-600); }
.bli-job {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 2px;
}
.bli-address {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 2px;
}
.bli-distance {
    color: #555;
    font-weight: 500;
    margin-left: 6px;
}
.bli-status {
    text-align: right;
    min-width: 100px;
    flex-shrink: 0;
}
.bli-tag-deposit {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 0.6875rem;
    margin-top: 4px;
    display: inline-block;
}
.bli-tag-card {
    background: #f5f5f5;
    color: #111;
    border: 1px solid #e2e2e2;
    font-size: 0.6875rem;
    margin-top: 4px;
    display: inline-block;
}

/* ── Mobile: compact stacked booking cards ── */
@media (max-width: 768px) {
    .cal-fixed-cell.today {
        border-color: #111 !important;
    }
    .bli-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    /* Top row: time + name side by side */
    .bli-row::before { display: none; }
    .bli-time {
        min-width: auto;
        text-align: left;
        font-size: 0.8125rem;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 0.25rem;
    }
    .bli-avatar { display: none; }
    .bli-info { min-width: 0; }
    .bli-name { font-size: 0.9375rem; }
    .bli-job, .bli-address {
        font-size: 0.8125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .bli-status {
        text-align: left;
        min-width: auto;
        display: flex;
        gap: 0.375rem;
        flex-wrap: wrap;
        margin-top: 0.5rem;
    }
}
