/* ==========================================================================
   Booking flow â€” responsive (desktop / tablet / mobile)
   ========================================================================== */

:root {
    --ps-sticky-booking-height: 0px;
    --ps-mobile-book-bar-height: 0px;
    --ps-booking-gutter: 16px;
}

/* --------------------------------------------------------------------------
   Sticky booking bar
   -------------------------------------------------------------------------- */
.ps-sticky-booking {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    padding: 8px var(--ps-booking-gutter) calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 75%, rgba(255, 255, 255, 0));
    pointer-events: none;
}

.ps-sticky-booking-inner {
    pointer-events: auto;
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 14px;
    min-height: 56px;
}

.ps-sticky-zone-cart {
    flex: 0 0 auto;
    min-width: 0;
}

.ps-sticky-summary-full {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ps-sticky-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px 0;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
    min-height: 36px;
}

.ps-sticky-row:hover {
    background: #f8f9fa;
}

.ps-sticky-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.ps-sticky-icon-test {
    background: #e8f0fe;
    color: #1a73e8;
}

.ps-sticky-icon-package {
    background: #fce8e8;
    color: #dc3545;
}

.ps-sticky-count {
    font-weight: 700;
    font-size: 1rem;
    min-width: 1ch;
}

.ps-sticky-row .ps-sticky-count {
    color: #1a73e8;
}

.ps-sticky-row[data-ps-package-row] .ps-sticky-count {
    color: #dc3545;
}

.ps-sticky-label {
    flex: 1;
    font-size: 0.875rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.ps-sticky-chevron {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    font-size: 11px;
    line-height: 1;
    opacity: 0.5;
    flex-shrink: 0;
}

.ps-sticky-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    max-width: 100%;
    transition: background 0.15s;
}

.ps-sticky-compact:hover {
    background: #e9ecef;
}

.ps-sticky-compact-text {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-sticky-zone-lab {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 0;
}

.ps-sticky-lab-info {
    flex: 1;
    min-width: 0;
    padding: 0 4px;
}

.ps-sticky-lab-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 1px;
}

.ps-sticky-lab-name {
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-sticky-zone-lab.ps-sticky-lab-empty .ps-sticky-lab-info {
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}

.ps-sticky-zone-lab.ps-sticky-lab-empty .ps-sticky-lab-label {
    color: #94a3b8;
}

.ps-sticky-zone-lab.ps-sticky-lab-empty .ps-sticky-lab-name {
    color: #64748b;
    font-weight: 600;
}

.ps-sticky-lab-meta {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-sticky-zone-lab.ps-sticky-lab-empty .ps-sticky-lab-meta {
    color: #94a3b8;
    margin-top: 1px;
}

.ps-sticky-divider {
    width: 1px;
    height: 40px;
    background: #e9ecef;
    flex-shrink: 0;
    margin: 0 12px;
}

.ps-sticky-divider-cta {
    margin-left: auto;
    margin-right: 12px;
}

.ps-sticky-continue {
    white-space: nowrap;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 18px;
    flex-shrink: 0;
    min-height: 44px;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ps-sticky-continue.btn-outline-primary {
    background: #fff;
}

.ps-sticky-continue:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ps-sticky-lab-pending .ps-sticky-continue {
    min-width: 132px;
}

.ps-sticky-booking:not(.ps-sticky-mode-lab) .ps-sticky-zone-cart {
    flex: 1;
    min-width: 0;
}

.ps-sticky-booking:not(.ps-sticky-mode-lab) .ps-sticky-divider-cta {
    margin-left: 12px;
}

.ps-sticky-mode-lab .ps-sticky-booking-inner {
    gap: 0;
}

body.ps-has-sticky-booking {
    padding-bottom: calc(var(--ps-sticky-booking-height) + 12px + env(safe-area-inset-bottom));
}

/* --------------------------------------------------------------------------
   Modals & overlays
   -------------------------------------------------------------------------- */
#psLoginModal,
#psDuplicateModal,
#psMixingModal,
#coAddPatientModal {
    z-index: 11050 !important;
}

#psLoginModal ~ .modal-backdrop,
#psDuplicateModal ~ .modal-backdrop,
#psMixingModal ~ .modal-backdrop,
.modal-backdrop.show {
    z-index: 11040 !important;
}

#psCartSheet.offcanvas {
    z-index: 11060 !important;
}

.ps-booking-modal .modal-dialog {
    margin-left: auto;
    margin-right: auto;
}

.ps-booking-modal .modal-content {
    border-radius: 14px;
    overflow: hidden;
}

.ps-login-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ps-login-tabs::-webkit-scrollbar {
    display: none;
}

.ps-login-tabs .nav-link {
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
    white-space: nowrap;
}

.js-toggle-book {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

/* --------------------------------------------------------------------------
   Cart sheet
   -------------------------------------------------------------------------- */
.ps-cart-sheet {
    max-height: min(70vh, 520px);
    border-radius: 16px 16px 0 0;
}

.ps-cart-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ps-cart-sheet-item span.flex-grow-1 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ps-sheet-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ps-sheet-icon-test {
    background: #e8f0fe;
    color: #1a73e8;
}

.ps-sheet-icon-package {
    background: #fce8e8;
    color: #dc3545;
}

/* --------------------------------------------------------------------------
   Modals â€” icons & lists
   -------------------------------------------------------------------------- */
.ps-modal-icon-warning {
    font-size: 2rem;
    color: #fd7e14;
}

.ps-modal-icon-mix {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fd7e14;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto;
}

.ps-duplicate-list li {
    padding: 4px 0;
}

/* --------------------------------------------------------------------------
   Cart page
   -------------------------------------------------------------------------- */
.ps-page-cart .ps-cart-payment-summary {
    position: sticky;
    top: calc(var(--header-height, 100px) + 16px);
    align-self: flex-start;
}

.ps-cart-lab-card {
    border-color: #e9ecef;
    background: #f8f9fa;
}

.ps-cart-lab-card .card-body,
.ps-cart-address-card .card-body {
    padding: 1rem;
}

.ps-cart-item-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ps-cart-item-actions .btn {
    min-height: 44px;
}

/* --------------------------------------------------------------------------
   Choose lab page
   -------------------------------------------------------------------------- */
.ps-choose-lab-title span {
    color: var(--bs-primary, #6f42c1);
}

.ps-choose-lab-toolbar .search-container {
    margin-bottom: 0;
}

.ps-choose-lab-toolbar .btn {
    min-height: 44px;
}

.ps-lab-cards .ps-lab-card {
    border-radius: 12px;
    transition: box-shadow 0.2s;
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ps-lab-card-selected {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.2);
}

.ps-lab-radio {
    padding-top: 4px;
    flex-shrink: 0;
}

.ps-lab-card .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
}

.ps-lab-card .ps-lab-card-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.ps-lab-card h5 {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    word-break: break-word;
}

.ps-lab-card .js-select-lab-btn {
    min-height: 44px;
    width: 100%;
    max-width: 160px;
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   Catalog cards (tests & packages in listing)
   -------------------------------------------------------------------------- */
.lab-test-card-grid > [class*="col-"] {
    display: flex;
}

.lab-test-card-grid .lab-test-card {
    width: 100%;
    background-color: #fff;
}

.lab-test-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lab-test-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.lab-test-card .card-top > .d-flex {
    gap: 0.75rem 1rem;
    align-items: flex-start;
}

.lab-test-card .card-top > .d-flex > .d-flex {
    flex: 0 1 auto;
    min-width: 0;
}

.lab-test-card .card-top .value {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    word-break: break-word;
}

.lab-test-card__heading {
    margin-bottom: 0.65rem;
}

.lab-test-card__heading h3 {
    margin-bottom: 0.35rem;
}

.lab-test-card-aka {
    margin: 0;
    line-height: 1.35;
}

.lab-test-card .card-bottom {
    margin-top: auto;
}

.health-package .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.health-package__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.health-package__meta {
    flex: 1 1 auto;
    min-height: 4.5rem;
}

.health-package__meta-line {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    min-height: 1.35em;
}

.health-package__footer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
}

.health-package__price {
    flex: 0 0 auto;
    min-width: 0;
    line-height: 1.1;
}

.health-package__price .package-price {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    white-space: nowrap;
}

.health-package__btn-view,
.health-package__btn-book {
    flex: 0 0 auto;
    min-height: 36px;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    white-space: nowrap;
}

.health-package__btn-book {
    flex: 1 1 auto;
    min-width: 0;
}

.health-package--menu h3 {
    min-height: 2.5em;
}

.lab-test-card .card-bottom > .d-flex:first-child {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.lab-test-card .card-bottom .package-price {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
}

.health-package .mt-auto .d-flex.gap-1,
.health-package .mt-auto .d-flex.gap-2 {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.5rem !important;
}

.health-package .mt-auto .d-flex.gap-1 .btn,
.health-package .mt-auto .d-flex.gap-2 .btn {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 36px;
}

/* ==========================================================================
   TABLET (â‰¤ 991px)
   ========================================================================== */
@media (max-width: 991.98px) {
    :root {
        --ps-booking-gutter: 12px;
    }

    .ps-sticky-booking-inner {
        flex-wrap: wrap;
        padding: 10px 12px;
        align-items: stretch;
    }

    .ps-sticky-booking:not(.ps-sticky-mode-lab) .ps-sticky-zone-cart {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .ps-sticky-booking:not(.ps-sticky-mode-lab) .ps-sticky-divider-cta {
        display: none;
    }

    .ps-sticky-booking:not(.ps-sticky-mode-lab) .ps-sticky-continue {
        flex: 1 1 100%;
        width: 100%;
        margin-top: 8px;
        order: 3;
    }

    .ps-sticky-mode-lab .ps-sticky-zone-cart {
        flex: 1;
        min-width: 0;
    }

    .ps-sticky-mode-lab .ps-sticky-zone-lab {
        order: 3;
        width: 100%;
        flex: 1 1 100%;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
        margin-top: 4px;
    }

    .ps-sticky-mode-lab .ps-sticky-zone-lab .ps-sticky-divider {
        display: none;
    }

    .ps-sticky-mode-lab .ps-sticky-divider-cta,
    .ps-sticky-divider-cta {
        display: none;
    }

    .ps-sticky-mode-lab .ps-sticky-continue,
    .ps-sticky-continue {
        width: 100%;
        order: 4;
        margin-top: 8px;
        min-width: 0;
    }

    .ps-sticky-compact-text {
        max-width: min(160px, 40vw);
    }

    .ps-page-cart .ps-cart-payment-summary {
        position: static;
        top: auto;
    }

    .ps-choose-lab-toolbar .btn {
        width: 100%;
    }

    .ps-lab-card .js-select-lab-btn {
        max-width: none;
        width: 100%;
    }
}

/* ==========================================================================
   MOBILE (â‰¤ 575px)
   ========================================================================== */
@media (max-width: 575.98px) {
    :root {
        --ps-mobile-book-bar-height: 48px;
        --ps-booking-gutter: 10px;
    }

    body.ps-has-sticky-booking {
        padding-bottom: calc(
            var(--ps-sticky-booking-height) +
            var(--ps-mobile-book-bar-height) +
            8px +
            env(safe-area-inset-bottom)
        );
    }

    .ps-sticky-booking {
        padding-bottom: calc(6px + env(safe-area-inset-bottom));
    }

    .ps-sticky-booking-inner {
        border-radius: 12px;
        padding: 8px 10px;
        min-height: 52px;
    }

    .ps-sticky-label {
        font-size: 0.8125rem;
    }

    .ps-sticky-continue {
        font-size: 0.875rem;
        padding: 10px 14px;
    }

    .ps-sticky-compact-text {
        max-width: min(120px, 35vw);
        font-size: 0.8125rem;
    }

    .ps-cart-sheet {
        max-height: min(85vh, 600px);
    }

    .ps-cart-sheet-item {
        padding: 12px 16px;
        gap: 10px;
    }

    .ps-cart-lab-card .card-body {
        flex-direction: column;
        align-items: stretch !important;
    }

    .ps-cart-lab-card .btn {
        width: 100%;
    }

    .ps-cart-address-card .row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .ps-cart-address-card .text-end {
        text-align: left !important;
    }

    .ps-cart-address-card .btn {
        width: 100%;
    }

    .cart-item .card-body h3 {
        font-size: 1.05rem;
    }

    .cart-item .test-info > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .cart-item .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .cart-item .js-cart-remove {
        width: 100%;
    }

    .lab-test-card h3 {
        font-size: 1rem;
    }

    .lab-test-card .card-top > .d-flex {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .lab-test-card .value.location {
        font-size: 0.75rem;
        word-break: break-word;
    }

    .health-package .mt-auto {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .health-package .mt-auto .d-flex.gap-1,
    .health-package .mt-auto .d-flex.gap-2 {
        width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .health-package .mt-auto .d-flex.gap-1 .btn,
    .health-package .mt-auto .d-flex.gap-2 .btn {
        flex: 1 1 auto;
        width: auto;
    }

    .health-package__footer {
        gap: 0.35rem;
    }

    .health-package__price .package-price {
        font-size: 1rem;
    }

    .health-package__btn-view,
    .health-package__btn-book {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 0.8125rem;
    }

    .ps-lab-card .mb-2.d-flex.flex-wrap {
        gap: 0.35rem !important;
    }

    .ps-lab-card .badge {
        font-size: 0.7rem;
    }

    .ps-login-tabs .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }

    .ps-booking-modal .modal-body {
        padding: 1rem;
    }
}

/* ==========================================================================
   SMALL PHONES (â‰¤ 380px)
   ========================================================================== */
@media (max-width: 380px) {
    .ps-sticky-booking:not(.ps-sticky-mode-lab) .ps-sticky-zone-cart {
        max-width: 100%;
    }

    .ps-sticky-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .ps-sticky-count {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   DESKTOP (â‰¥ 992px)
   ========================================================================== */
@media (min-width: 992px) {
    .ps-sticky-booking-inner {
        padding: 10px 16px;
    }

    .ps-sticky-continue {
        padding: 10px 22px;
    }

    .ps-cart-sheet {
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
        left: 0;
        right: 0;
    }
}

/* Checkout 2-step wizard */
.ps-checkout-steps {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ps-checkout-steps::-webkit-scrollbar {
    display: none;
}

.ps-checkout-steps-list {
    align-items: center;
    width: 100%;
    min-width: 0;
}

.ps-checkout-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--bs-light, #f8f9fa);
    color: var(--bs-secondary, #6c757d);
    font-size: 0.9rem;
    font-weight: 500;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}

.ps-checkout-step.is-active {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
}

.ps-checkout-step.is-done {
    background: rgba(25, 135, 84, 0.12);
    color: var(--bs-success, #198754);
}

.ps-checkout-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.ps-checkout-step.is-active .ps-checkout-step-num {
    background: rgba(255, 255, 255, 0.25);
}

.ps-checkout-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-checkout-step-sep {
    color: var(--bs-secondary, #6c757d);
    opacity: 0.5;
    flex-shrink: 0;
    line-height: 1;
}

@media (max-width: 767.98px) {
    .ps-checkout-steps {
        margin-left: -2px;
        margin-right: -2px;
        padding-left: 2px;
        padding-right: 2px;
    }

    .ps-checkout-steps-list {
        gap: 0.2rem !important;
        justify-content: space-between;
    }

    .ps-checkout-step {
        flex: 1 1 0;
        justify-content: center;
        gap: 0.3rem;
        padding: 0.4rem 0.45rem;
        font-size: 0.72rem;
        border-radius: 999px;
        max-width: none;
    }

    .ps-checkout-step-num {
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.68rem;
    }

    .ps-checkout-step-sep {
        font-size: 0.7rem;
        margin: 0;
        width: 0.75rem;
        text-align: center;
    }

    .ps-checkout-step-sep i {
        font-size: 0.65rem;
    }
}

@media (max-width: 380px) {
    .ps-checkout-step {
        padding: 0.35rem 0.3rem;
        font-size: 0.65rem;
        gap: 0.2rem;
    }

    .ps-checkout-step-num {
        width: 1.05rem;
        height: 1.05rem;
        font-size: 0.62rem;
    }
}

/* Modern appointment slot picker */
.ps-slot-picker {
    border: 1px solid #e3ebf3;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
    padding: 1rem;
}

.ps-slot-picker-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 120px;
    text-align: center;
    color: #6c7a89;
    font-size: 0.9rem;
}

.ps-slot-picker-empty i {
    font-size: 1.75rem;
    color: #13b6ec;
    opacity: 0.85;
}

.ps-slot-picker-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 100px;
    color: #6c7a89;
    font-size: 0.9rem;
}

.ps-slot-picker-loading .spinner-border {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 0.15em;
    color: #13b6ec;
}

.ps-slot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px dashed #dbe5ef;
}

.ps-slot-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #5c6b7a;
}

.ps-slot-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.ps-slot-legend-dot.is-available {
    background: #fff;
    border: 2px solid #13b6ec;
}

.ps-slot-legend-dot.is-selected {
    background: #13b6ec;
    border: 2px solid #13b6ec;
}

.ps-slot-legend-dot.is-booked {
    background: #f1f3f5;
    border: 2px solid #ced4da;
}

.ps-slot-legend-dot.is-held {
    background: #fff8e6;
    border: 2px solid #f0ad4e;
}

.ps-slot-legend-dot.is-selected-held {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    border: 2px solid #ea580c;
}

.ps-slot-legend-dot.is-current {
    background: #eef2f6;
    border: 2px dashed #8a97a6;
}

.ps-slot-hold-timer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 0.88rem;
    font-weight: 500;
}

.ps-slot-hold-timer i {
    color: #ea580c;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.ps-slot-hold-timer strong {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: #c2410c;
}

.ps-slot-hold-timer.is-urgent {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
    color: #991b1b;
    animation: ps-slot-timer-pulse 1s ease-in-out infinite;
}

.ps-slot-hold-timer.is-urgent i,
.ps-slot-hold-timer.is-urgent strong {
    color: #b91c1c;
}

@keyframes ps-slot-timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

.ps-global-slot-hold {
    --gsh-ink: #7c2d12;
    --gsh-muted: #9a3412;
    --gsh-accent: #ea580c;
    --gsh-line: rgba(234, 88, 12, 0.22);
    --gsh-bg-a: #fff7ed;
    --gsh-bg-b: #ffedd5;
    --gsh-chip-bg: #fff;
    --gsh-chip-border: #fdba74;
    --gsh-btn-bg: #ea580c;
    --gsh-btn-bg-hover: #c2410c;
    --gsh-gutter-x: 0.75rem;
    --gsh-gutter-top: 0.5rem;
    --gsh-gutter-bottom: 0.55rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    padding: var(--gsh-gutter-top) var(--gsh-gutter-x) var(--gsh-gutter-bottom);
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--gsh-ink);
    pointer-events: none;
}

.ps-global-slot-hold.is-urgent {
    --gsh-ink: #7f1d1d;
    --gsh-muted: #991b1b;
    --gsh-accent: #dc2626;
    --gsh-line: rgba(220, 38, 38, 0.28);
    --gsh-bg-a: #fef2f2;
    --gsh-bg-b: #fee2e2;
    --gsh-chip-border: #fca5a5;
    --gsh-btn-bg: #dc2626;
    --gsh-btn-bg-hover: #b91c1c;
}

.ps-global-slot-hold-inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.85rem 1.1rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.75rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--gsh-line);
    background:
        linear-gradient(90deg, rgba(234, 88, 12, 0.95) 0, rgba(234, 88, 12, 0.95) 4px, transparent 4px),
        linear-gradient(105deg, var(--gsh-bg-a) 0%, var(--gsh-bg-b) 48%, #fff8f1 100%);
    box-shadow: 0 10px 28px rgba(124, 45, 18, 0.14);
}

.ps-global-slot-hold.is-urgent .ps-global-slot-hold-inner {
    background:
        linear-gradient(90deg, rgba(220, 38, 38, 0.95) 0, rgba(220, 38, 38, 0.95) 4px, transparent 4px),
        linear-gradient(105deg, var(--gsh-bg-a) 0%, var(--gsh-bg-b) 55%, #fff5f5 100%);
    animation: ps-slot-timer-pulse 1.1s ease-in-out infinite;
}

.ps-global-slot-hold-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex: 1 1 auto;
}

.ps-global-slot-hold-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    color: #fff;
    background: linear-gradient(145deg, var(--gsh-accent) 0%, #c2410c 100%);
    box-shadow: 0 6px 14px rgba(234, 88, 12, 0.28);
    font-size: 1.05rem;
}

.ps-global-slot-hold.is-urgent .ps-global-slot-hold-icon {
    background: linear-gradient(145deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.28);
}

.ps-global-slot-hold-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.ps-global-slot-hold-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gsh-muted);
    line-height: 1.2;
}

.ps-global-slot-hold-slot {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gsh-ink);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-global-slot-hold-countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    padding: 0.35rem 0.7rem 0.35rem 0.55rem;
    border-radius: 999px;
    background: var(--gsh-chip-bg);
    border: 1px solid var(--gsh-chip-border);
    box-shadow: 0 2px 8px rgba(124, 45, 18, 0.06);
}

.ps-global-slot-hold-countdown-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gsh-muted);
    white-space: nowrap;
}

.ps-global-slot-hold-countdown-value {
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: var(--gsh-accent);
    line-height: 1;
    min-width: 3.1rem;
    text-align: center;
}

.ps-global-slot-hold-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.ps-global-slot-hold-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.48rem 0.9rem;
    border-radius: 999px;
    background: var(--gsh-btn-bg);
    color: #fff !important;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(234, 88, 12, 0.28);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ps-global-slot-hold-btn:hover,
.ps-global-slot-hold-btn:focus {
    background: var(--gsh-btn-bg-hover);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(194, 65, 12, 0.32);
}

.ps-global-slot-hold-btn i {
    font-size: 0.95rem;
    line-height: 1;
}

.ps-global-slot-hold-release {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--gsh-chip-border);
    background: rgba(255, 255, 255, 0.85);
    color: var(--gsh-muted);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ps-global-slot-hold-release:hover,
.ps-global-slot-hold-release:focus {
    background: #fff;
    color: var(--gsh-ink);
    border-color: var(--gsh-accent);
}

body.ps-has-global-slot-hold .mobile-header,
body.ps-has-global-slot-hold .desktop-header {
    top: var(--ps-global-slot-hold-height, 0px);
}

/* Desktop: clean full-width top bar (no floating gaps) */
@media (min-width: 1025px) {
    .ps-global-slot-hold {
        --gsh-gutter-x: 0;
        --gsh-gutter-top: 0;
        --gsh-gutter-bottom: 0;
    }

    .ps-global-slot-hold-inner {
        max-width: none;
        border: 0;
        border-bottom: 1px solid var(--gsh-line);
        border-radius: 0;
        box-shadow: 0 4px 16px rgba(124, 45, 18, 0.1);
        padding: 0.6rem clamp(1rem, 4vw, 3rem);
    }
}

/* Align gutters with mobile header pill */
@media (max-width: 1024px) {
    .ps-global-slot-hold {
        --gsh-gutter-x: 0.7rem;
        --gsh-gutter-top: 0.5rem;
        --gsh-gutter-bottom: 0.5rem;
    }

    .ps-global-slot-hold-inner {
        border-radius: 16px;
    }
}

@media (max-width: 991.98px) {
    .ps-global-slot-hold-inner {
        padding: 0.7rem 0.9rem;
        gap: 0.7rem;
    }

    .ps-global-slot-hold-slot {
        font-size: 0.9rem;
    }

    .ps-global-slot-hold-btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Mobile L/M: floating card + two-row layout + gap to header card */
@media (max-width: 767.98px) {
    .ps-global-slot-hold {
        --gsh-gutter-x: 0.7rem;
        --gsh-gutter-top: 0.5rem;
        --gsh-gutter-bottom: 0.55rem;
    }

    .ps-global-slot-hold-inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "icon text countdown"
            "actions actions actions";
        align-items: center;
        padding: 0.7rem 0.75rem 0.75rem;
        gap: 0.65rem 0.55rem;
        border-radius: 16px;
        background: linear-gradient(160deg, var(--gsh-bg-a) 0%, var(--gsh-bg-b) 100%);
    }

    .ps-global-slot-hold.is-urgent .ps-global-slot-hold-inner {
        background: linear-gradient(160deg, var(--gsh-bg-a) 0%, var(--gsh-bg-b) 100%);
    }

    .ps-global-slot-hold-main {
        display: contents;
    }

    .ps-global-slot-hold-icon {
        grid-area: icon;
        width: 2.2rem;
        height: 2.2rem;
        border-radius: 0.7rem;
        font-size: 0.95rem;
    }

    .ps-global-slot-hold-text {
        grid-area: text;
        gap: 0.1rem;
    }

    .ps-global-slot-hold-title {
        font-size: 0.64rem;
    }

    .ps-global-slot-hold-slot {
        font-size: 0.88rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ps-global-slot-hold-countdown {
        grid-area: countdown;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.08rem;
        padding: 0.35rem 0.55rem;
        border-radius: 0.75rem;
        min-width: 4.4rem;
    }

    .ps-global-slot-hold-countdown-label {
        font-size: 0.56rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .ps-global-slot-hold-countdown-value {
        font-size: 1rem;
        min-width: 0;
    }

    .ps-global-slot-hold-actions {
        grid-area: actions;
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
        gap: 0.55rem;
        width: 100%;
    }

    .ps-global-slot-hold-btn {
        width: 100%;
        min-height: 2.65rem;
        border-radius: 0.75rem;
        font-size: 0.84rem;
        box-shadow: 0 6px 14px rgba(234, 88, 12, 0.22);
    }

    .ps-global-slot-hold-release {
        width: 100%;
        min-height: 2.65rem;
        border-radius: 0.75rem;
        padding-inline: 0.65rem;
        font-size: 0.8rem;
        background: #fff;
    }
}

/* Mobile S */
@media (max-width: 480px) {
    .ps-global-slot-hold {
        --gsh-gutter-x: 0.55rem;
        --gsh-gutter-top: 0.45rem;
        --gsh-gutter-bottom: 0.5rem;
    }

    .ps-global-slot-hold-inner {
        padding: 0.65rem 0.65rem 0.7rem;
        gap: 0.55rem 0.45rem;
        border-radius: 14px;
    }

    .ps-global-slot-hold-icon {
        width: 2rem;
        height: 2rem;
        font-size: 0.88rem;
    }

    .ps-global-slot-hold-slot {
        font-size: 0.8rem;
    }

    .ps-global-slot-hold-countdown {
        min-width: 4rem;
        padding: 0.3rem 0.45rem;
    }

    .ps-global-slot-hold-countdown-value {
        font-size: 0.95rem;
    }

    .ps-global-slot-hold-actions {
        gap: 0.5rem;
        grid-template-columns: 1fr 1fr;
    }

    .ps-global-slot-hold-btn,
    .ps-global-slot-hold-release {
        min-height: 2.55rem;
        font-size: 0.78rem;
    }
}

/* Mobile XS: stack actions for breathing room */
@media (max-width: 360px) {
    .ps-global-slot-hold {
        --gsh-gutter-x: 0.45rem;
        --gsh-gutter-top: 0.4rem;
        --gsh-gutter-bottom: 0.45rem;
    }

    .ps-global-slot-hold-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "text countdown"
            "actions actions";
        padding: 0.6rem 0.55rem 0.65rem;
        border-radius: 14px;
        gap: 0.5rem;
    }

    .ps-global-slot-hold-icon {
        display: none;
    }

    .ps-global-slot-hold-slot {
        font-size: 0.76rem;
    }

    .ps-global-slot-hold-actions {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .ps-global-slot-hold-btn {
        order: 1;
    }

    .ps-global-slot-hold-release {
        order: 2;
    }

    .ps-global-slot-hold-btn,
    .ps-global-slot-hold-release {
        min-height: 2.45rem;
        font-size: 0.76rem;
    }
}

.ps-slot-period + .ps-slot-period {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.ps-slot-accordion {
    margin-top: 0.85rem;
}

.ps-slot-accordion .accordion-item {
    border-color: #dbe5ef;
    overflow: hidden;
}

.ps-slot-accordion .accordion-item + .accordion-item {
    margin-top: 0.65rem;
    border-top: 1px solid #dbe5ef;
}

.ps-slot-accordion .accordion-button {
    padding: 0.8rem 1rem;
    font-size: 0.92rem;
    color: #1a3e6f;
    background: #f8fbfd;
    box-shadow: none;
}

.ps-slot-accordion .accordion-button:not(.collapsed) {
    color: #1a3e6f;
    background: #eef9fd;
    box-shadow: none;
}

.ps-slot-accordion .accordion-button::after {
    margin-left: 0.75rem;
}

.ps-slot-period-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.ps-slot-period-toggle-main {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.ps-slot-period-toggle-main i {
    color: #13b6ec;
    font-size: 1rem;
    flex-shrink: 0;
}

.ps-slot-period-toggle-main strong {
    font-size: 0.92rem;
    color: #1a3e6f;
    font-weight: 600;
}

.ps-slot-period-toggle-main small {
    color: #8a97a5;
    font-size: 0.78rem;
    font-weight: 400;
}

.ps-slot-period-count {
    flex-shrink: 0;
    font-size: 0.76rem;
    font-weight: 600;
    color: #0d8ab8;
    background: #e8f7fc;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.ps-slot-accordion .accordion-body {
    padding: 0.85rem 1rem 1rem;
}

.ps-slot-period-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ps-slot-period-head i {
    color: #13b6ec;
    font-size: 1rem;
}

.ps-slot-period-head strong {
    font-size: 0.92rem;
    color: #1a3e6f;
    font-weight: 600;
}

.ps-slot-period-head small {
    color: #8a97a5;
    font-size: 0.78rem;
    margin-left: auto;
}

.ps-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 0.65rem;
}

.ps-slot-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 72px;
    padding: 0.55rem 0.45rem;
    border-radius: 10px;
    border: 1.5px solid #cfe8f5;
    background: #fff;
    color: #1a3e6f;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    text-align: center;
    line-height: 1.2;
}

.ps-slot-chip:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(19, 182, 236, 0.15);
    border-color: #13b6ec;
}

.ps-slot-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(19, 182, 236, 0.25);
}

.ps-slot-chip-time {
    font-size: 0.92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.ps-slot-chip-end {
    font-size: 0.72rem;
    color: #7b8a99;
    font-variant-numeric: tabular-nums;
}

.ps-slot-chip-badge {
    margin-top: 0.15rem;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: #e8f7fc;
    color: #0d8ab5;
}

.ps-slot-chip.is-selected-held {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #ea580c 100%);
    border-color: #ea580c;
    color: #fff;
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.35);
    transform: translateY(-1px);
    cursor: pointer;
}

.ps-slot-chip.is-selected-held .ps-slot-chip-end {
    color: rgba(255, 255, 255, 0.9);
}

.ps-slot-chip.is-selected-held .ps-slot-chip-badge {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.ps-slot-chip.is-selected-held::after {
    content: '\F26B';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.75rem;
    color: #fff;
}

.ps-slot-chip.is-selected {
    background: linear-gradient(135deg, #13b6ec 0%, #0d9fd4 100%);
    border-color: #13b6ec;
    color: #fff;
    box-shadow: 0 8px 20px rgba(19, 182, 236, 0.35);
    transform: translateY(-1px);
}

.ps-slot-chip.is-selected .ps-slot-chip-end {
    color: rgba(255, 255, 255, 0.88);
}

.ps-slot-chip.is-selected .ps-slot-chip-badge {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.ps-slot-chip.is-selected::after {
    content: '\F26B';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.75rem;
    color: #fff;
}

.ps-slot-chip.is-booked,
.ps-slot-chip.is-past {
    background: #f4f6f8;
    border-color: #dde3ea;
    color: #9aa5b1;
    cursor: not-allowed;
    opacity: 0.85;
}

.ps-slot-chip.is-current {
    background: #eef2f6;
    border-color: #8a97a6;
    border-style: dashed;
    color: #5c6b7a;
    cursor: not-allowed;
    opacity: 0.95;
}

.ps-slot-chip.is-current .ps-slot-chip-badge {
    background: #dbe3ea;
    color: #445566;
}

.ps-slot-chip.is-booked .ps-slot-chip-time,
.ps-slot-chip.is-past .ps-slot-chip-time {
    text-decoration: line-through;
}

.ps-slot-chip.is-held {
    background: #fff9ed;
    border-color: #f5d08a;
    color: #9a6b00;
    cursor: not-allowed;
}

.ps-slot-chip.is-held .ps-slot-chip-badge {
    background: #ffefc7;
    color: #9a6b00;
}

.ps-slot-selected-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 0.88rem;
}

.ps-slot-selected-summary i {
    color: #ea580c;
    flex-shrink: 0;
}

.co-rad-slots.ps-slot-picker {
    margin-top: 0.25rem;
}

.ps-patient-card-row {
    display: flex;
    align-items: stretch;
}

.ps-patient-card-row .ps-patient-card {
    flex: 1;
    min-width: 0;
}

.ps-patient-card {
    position: relative;
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.7rem 0.7rem;
    border-radius: 12px;
    border: 1px solid #dfe8f1;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ps-patient-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, #13b6ec 0%, #0d8fd0 100%);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.ps-patient-card:hover {
    border-color: #b8dff2;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.ps-patient-card.is-selected {
    border-color: #13b6ec;
    background: linear-gradient(135deg, #fff 0%, #f7fcff 100%);
    box-shadow: 0 5px 16px rgba(19, 182, 236, 0.13);
}

.ps-patient-card.is-selected::before {
    opacity: 1;
}

.ps-patient-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ps-patient-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #0b6f9c;
    background: linear-gradient(135deg, #e6f7fe 0%, #d3ecfa 100%);
    transition: background 0.18s ease, color 0.18s ease;
}

.ps-patient-card.is-selected .ps-patient-avatar {
    background: linear-gradient(135deg, #13b6ec 0%, #0d8fd0 100%);
    color: #fff;
}

.ps-patient-card-ident {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.ps-patient-card-name {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.2;
    color: #0f2748;
    overflow-wrap: anywhere;
}

.ps-patient-uhid {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    align-self: flex-start;
    max-width: 100%;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    color: #476b8f;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.ps-patient-uhid i {
    color: #13b6ec;
    font-size: 0.7rem;
}

.ps-patient-uhid--pending {
    color: #9a5b12;
}

.ps-patient-card-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem 0.55rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eef3f8;
}

.ps-patient-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.ps-patient-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    flex-shrink: 0;
    background: #eef8fd;
    color: #13b6ec;
    font-size: 0.68rem;
}

.ps-patient-stat__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ps-patient-stat__label {
    color: #8496aa;
    font-size: 0.57rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ps-patient-stat__value {
    font-weight: 600;
    font-size: 0.73rem;
    line-height: 1.2;
    color: #16304f;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ps-patient-card-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid #dbe5ef;
    background: #fff;
    color: transparent;
    font-size: 0.68rem;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.ps-patient-card.is-selected .ps-patient-card-check {
    background: #13b6ec;
    border-color: #13b6ec;
    color: #fff;
}

@media (min-width: 992px) {
    #coPatientList {
        max-height: 17rem;
        overflow-y: auto;
        padding: 2px;
        margin: -2px;
        scrollbar-width: thin;
    }
}

@media (max-width: 575.98px) {
    .ps-slot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ps-slot-period-head small {
        display: none;
    }
}

/* Add family member modal â€” aligned with website theme (style.css) */
.co-add-patient-modal {
    --co-primary: #13b6ec;
    --co-primary-hover: #05a2d6;
    --co-navy: #1a3e6f;
    --co-border: #dae3ee;
    --co-border-soft: #dbe5ef;
    --co-surface: #f0f6fe;
    --co-surface-alt: #f1f8ff;
    --co-text: rgb(15, 23, 42);
}

.co-add-patient-modal .modal-content {
    background: #fff;
    border: none;
}

.co-patient-section-header {
    background: var(--co-surface-alt);
    color: var(--co-navy);
    font-weight: 600;
    padding: 0.55rem 1rem;
    border: 1px solid var(--co-border);
    border-bottom: none;
    border-left: 3px solid var(--co-primary);
    border-radius: 8px 8px 0 0;
    font-size: 0.9rem;
}

.co-add-patient-modal .co-patient-section-body {
    border-color: var(--co-border) !important;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

.co-add-patient-modal .co-add-patient-modal-body {
    background: var(--co-surface);
}

.co-add-patient-modal .modal-footer {
    background: var(--co-surface);
    border-top: 1px solid var(--co-border);
    padding: 0.85rem 1.25rem;
}

.co-add-patient-modal-subtitle {
    font-size: 0.82rem;
    opacity: 0.88;
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.92);
}

.co-add-patient-modal .form-label {
    color: var(--co-text);
    font-weight: 600;
    font-size: 0.88rem;
}

.co-add-patient-modal .form-control,
.co-add-patient-modal .form-select {
    border-color: var(--co-border-soft);
    border-radius: 8px;
    color: var(--co-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.co-add-patient-modal .form-control:focus,
.co-add-patient-modal .form-select:focus {
    border-color: var(--co-primary);
    box-shadow: 0 0 0 0.2rem rgba(19, 182, 236, 0.2);
}

/* Use site .btn-primary from style.css â€” no gradient override */
.co-add-patient-modal .modal-footer .btn-primary {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

.co-add-patient-modal .modal-footer .btn-outline-secondary {
    border-radius: 8px;
}

.co-gender-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.co-gender-pills .btn-outline-primary {
    border-radius: 8px;
    min-width: 4.5rem;
    font-weight: 500;
}

.co-gender-pills .btn-check:checked + .btn-outline-primary {
    background-color: var(--co-primary);
    border-color: var(--co-primary);
    color: #fff;
}

.co-dob-age-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.65rem;
}

.co-dob-age-field {
    flex: 1 1 0;
    min-width: 4.5rem;
}

.co-dob-age-field--dob {
    flex: 2.2 1 0;
    min-width: 9.5rem;
}

.co-dob-age-row .form-label {
    margin-bottom: 0.35rem;
    white-space: nowrap;
}

.co-dob-age-row .form-control {
    min-height: calc(1.5em + 0.75rem + 2px);
}

.co-age-auto-badge {
    background: rgba(19, 182, 236, 0.1);
    color: var(--co-primary);
    font-weight: 600;
    font-size: 0.68rem;
    vertical-align: middle;
    margin-left: 0.35rem;
}

.co-add-patient-modal .form-control[readonly] {
    background-color: #fff;
    border-color: var(--co-border-soft);
    color: var(--co-text);
}

.co-add-patient-modal input[type="date"].form-control {
    min-height: calc(1.5em + 0.75rem + 2px);
    color: var(--co-text);
}

.co-add-patient-modal input[type="date"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    filter: invert(48%) sepia(90%) saturate(1200%) hue-rotate(160deg) brightness(95%) contrast(90%);
}

#coAddPatientModal .modal-dialog {
    max-width: min(1140px, calc(100vw - 1.5rem));
}

#coAddPatientModal.modal .modal-content {
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#coAddPatientModal .co-add-patient-modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 10rem);
}

#coAddPatientModal .modal-footer {
    flex-shrink: 0;
}

.co-address-option {
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.co-address-option:has(input:checked) {
    border-color: var(--co-primary, #13b6ec) !important;
    background: rgba(19, 182, 236, 0.08);
}

#coBookingAddressSection .co-booking-address-option {
    margin-bottom: 0;
}

#coBookingAddressSection .form-check-label {
    cursor: pointer;
}

