/* MNL-BUYER-QA-P1-02: shared WCAG 2.2 AA remediation layer. */
:where(a, button, input, select, textarea, summary, [role="button"], [role="link"], [tabindex]):focus-visible {
    outline: 3px solid #d97706 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px var(--bs-body-bg, #fff) !important;
}

.reception-search-stage .reception-page-heading {
    margin: 0;
    font-size: clamp(2.4rem, 8vw, 5.2rem);
    font-weight: 950;
    letter-spacing: -.08em;
    color: var(--text, #111827);
}

.btn-primary,
html[data-theme] .btn-primary {
    background-color: #047857 !important;
    border-color: #047857 !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus-visible,
html[data-theme] .btn-primary:hover,
html[data-theme] .btn-primary:focus-visible {
    background-color: #065f46 !important;
    border-color: #065f46 !important;
}

.btn-dark,
html[data-theme] .btn-dark {
    background-color: #1f2937 !important;
    border-color: #1f2937 !important;
    color: #fff !important;
}

.btn-dark:hover,
.btn-dark:focus-visible,
html[data-theme] .btn-dark:hover,
html[data-theme] .btn-dark:focus-visible {
    background-color: #111827 !important;
    border-color: #111827 !important;
}

.btn span,
.btn i,
.table-bulk-actions .btn span,
.invoice-action-btn .invoice-action-btn__title {
    color: inherit !important;
}

html[data-theme] body .btn span,
html[data-theme] body .btn i,
html[data-theme] body .table td .btn span,
html[data-theme] body .panel .invoice-action-btn span {
    color: inherit !important;
}

html[data-theme] body .table td .btn-primary,
html[data-theme] body .table td .btn-primary:hover,
html[data-theme] body .table td .btn-primary:focus-visible {
    background-color: #047857 !important;
    border-color: #047857 !important;
    color: #fff !important;
}

.table-row-checkbox,
.table-check-all,
.patient-native-checkbox,
input[type="checkbox"],
input[type="radio"] {
    min-width: 28px !important;
    min-height: 28px !important;
}

#globalSearchInput {
    min-height: 32px !important;
}

.form-control-sm {
    min-width: 24px;
}

.table-selected-count,
.reception-action-count,
html[data-theme] .table-selected-count,
html[data-theme] .reception-action-count {
    background: #111827 !important;
    color: #fff !important;
}

.badge.bg-dark,
html[data-theme] .badge.bg-dark {
    background: #334155 !important;
    color: #fff !important;
}

.status-pill,
.status-pill * {
    color: #374151 !important;
}

.status-pill.status-pending,
.status-pill.status-confirmed {
    background: #dbeafe !important;
    color: #1e3a8a !important;
}

.status-pill.status-checked_in {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.status-pill.status-in_service {
    background: #ede9fe !important;
    color: #5b21b6 !important;
}

.status-pill.status-completed,
.status-pill.status-done {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.status-pill.status-cancelled,
.status-pill.status-unpaid {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.status-pill.status-no_show {
    background: #fef3c7 !important;
    color: #92400e !important;
}

html[data-theme] body .table td span.status-pill.status-pending,
html[data-theme] body .table td span.status-pill.status-confirmed {
    background: #dbeafe !important;
    color: #1e3a8a !important;
}

html[data-theme] body .table td span.status-pill.status-checked_in {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

html[data-theme] body .table td span.status-pill.status-in_service {
    background: #ede9fe !important;
    color: #5b21b6 !important;
}

html[data-theme] body .table td span.status-pill.status-completed,
html[data-theme] body .table td span.status-pill.status-done {
    background: #dcfce7 !important;
    color: #166534 !important;
}

html[data-theme] body .table td span.status-pill.status-cancelled,
html[data-theme] body .table td span.status-pill.status-unpaid {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

html[data-theme] body .table td span.status-pill.status-no_show {
    background: #fef3c7 !important;
    color: #92400e !important;
}

html[data-theme] body span.table-selected-count,
html[data-theme] body span.reception-action-count {
    background: #111827 !important;
    color: #fff !important;
}

html[data-theme="light"] .text-muted {
    color: #475569 !important;
}

html[data-theme="dark"] .text-muted {
    color: #cbd5e1 !important;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 620px) {
    .topbar-context {
        order: 2;
        display: block !important;
        flex: 1 1 64px;
        min-width: 0;
    }

    .topbar-context__eyebrow,
    .topbar-context p {
        display: none !important;
    }

    .topbar-context h1 {
        display: block !important;
        margin: 0 !important;
        overflow: hidden;
        font-size: 13px !important;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-mobile-search-toggle {
        order: 3 !important;
    }

    .topbar-actions {
        order: 4 !important;
    }

    .topbar .global-search {
        order: 5 !important;
    }
}
