.patient-mobile-tabs,
.patient-mobile-shell .patient-mobile-only,
.care-patient-portal .patient-phone-book,
.care-patient-portal .patient-phone-appointments,
.care-patient-portal .patient-phone-services {
    display: none;
}

.patient-hub-links {
    display: grid;
    gap: 12px;
}

.care-patient-portal .patient-hub-link {
    min-height: 64px;
}

.patient-hub-link > .icon:last-child {
    margin-inline-start: auto;
}

[dir="rtl"] .patient-hub-link > .icon:last-child {
    transform: scaleX(-1);
}

@media (max-width: 720px) {
    html:has(.patient-mobile-shell, .guest-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) {
        --mobile-tabs-height: calc(51px + env(safe-area-inset-bottom, 0px));
        scroll-padding-bottom: calc(var(--mobile-tabs-height) + 16px);
    }

    .patient-mobile-shell {
        padding-bottom: var(--mobile-tabs-height);
    }

    .patient-mobile-shell .back-to-top {
        margin-bottom: var(--mobile-tabs-height);
    }

    .patient-mobile-shell .care-header-row {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        direction: ltr;
        gap: 8px;
        min-height: 62px;
    }

    .patient-mobile-shell .care-header-actions {
        display: contents;
    }

    .patient-mobile-shell .care-header .care-brand {
        grid-area: 1 / 2;
        justify-self: center;
    }

    .patient-mobile-shell .care-header .noti-nav {
        grid-area: 1 / 1;
    }

    .patient-mobile-shell .care-header .user-menu-nav {
        grid-area: 1 / 3;
    }

    .patient-mobile-shell .care-header .noti-nav,
    .patient-mobile-shell .care-header .user-menu-nav {
        direction: inherit;
    }

    [dir="rtl"] .patient-mobile-shell .care-header :is(.noti-nav, .user-menu-nav) {
        direction: rtl;
    }

    .patient-mobile-shell .care-header :is(
        .care-brand-copy, .care-language-toggle, .theme-toggle-inline,
        .family-switch, .navbar-toggler, .care-mobile-nav, .care-nav
    ) {
        display: none;
    }

    .patient-mobile-shell .care-header .care-brand,
    .patient-mobile-shell .care-header :is(.header-icon-btn, .user-menu-btn) {
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }

    .patient-mobile-shell .care-header .care-brand-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .patient-mobile-shell .patient-mobile-only {
        display: flex;
    }

    .patient-mobile-shell .patient-hub-desktop-website {
        display: none;
    }

    .patient-mobile-shell .patient-mobile-preferences {
        display: grid;
        gap: 12px;
    }

    .patient-mobile-preferences fieldset {
        margin: 0;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 14px;
    }

    .patient-mobile-preferences legend {
        float: none;
        width: auto;
        padding-inline: 6px;
        margin: 0;
        font-size: .95rem;
        font-weight: 750;
    }

    .patient-preference-choices {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .patient-mobile-preferences .patient-preference-choices button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .patient-mobile-preferences .patient-preference-choices img {
        object-fit: contain;
        border-radius: 3px;
    }

    .patient-preference-choices button {
        min-height: 44px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--solid);
    }

    .patient-mobile-preferences .family-switch-btn {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 68px;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: var(--solid);
        box-shadow: var(--shadow-sm);
        text-align: start;
    }

    .patient-mobile-preferences .family-switch-copy {
        display: grid;
        flex: 1;
        min-width: 0;
    }

    .patient-mobile-preferences .family-switch-menu {
        width: 100%;
    }

    .patient-mobile-preferences .family-switch-action {
        color: var(--ink);
        font-size: .82rem;
        font-weight: 750;
        white-space: nowrap;
    }

    .patient-preference-choices button[aria-pressed="true"] {
        font-weight: 800;
        background: var(--b100);
    }

    [data-bs-theme="dark"] .care-patient-portal .patient-hub-link .dashboard-quick-icon {
        color: #b6e8d4;
    }

    .care-patient-portal.portal-main {
        padding-bottom: calc(var(--mobile-tabs-height, 51px) + 16px);
    }

    .care-patient-portal .mobile-side-open,
    .care-patient-portal .patient-sidebar,
    .care-patient-portal .patient-desktop-book,
    .care-patient-portal .patient-desktop-appointments,
    .care-patient-portal .patient-desktop-quick {
        display: none !important;
    }

    .care-patient-portal .patient-phone-appointments {
        display: block;
    }

    .care-patient-portal .patient-phone-book {
        display: inline-flex;
    }

    .care-patient-portal .patient-phone-services {
        display: grid;
        gap: 8px;
    }

    .patient-phone-services h2 {
        font-size: 1.15rem;
        margin: 0;
    }

    .patient-phone-services .patient-hub-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .care-patient-portal .patient-phone-services .patient-hub-link {
        gap: 8px;
        min-width: 0;
        padding: 8px;
        font-size: .82rem;
    }

    .patient-phone-services .dashboard-quick-icon {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
    }

    :is(.patient-mobile-shell, .guest-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) .patient-mobile-tabs {
        position: fixed;
        inset: auto 0 0;
        z-index: 1025;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        height: var(--mobile-tabs-height);
        gap: 2px;
        padding: 0 max(4px, env(safe-area-inset-right, 0px))
            env(safe-area-inset-bottom, 0px)
            max(4px, env(safe-area-inset-left, 0px));
        border-top: 1px solid var(--chrome-border);
        background: var(--chrome-surface-solid);
        box-shadow: var(--chrome-shadow-sm);
    }

    :is(.patient-mobile-shell, .guest-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) .patient-mobile-tabs a {
        display: grid;
        justify-items: center;
        align-content: end;
        gap: 3px;
        min-height: 44px;
        min-width: 0;
        padding: 2px 1px 5px;
        border-radius: 11px;
        color: var(--chrome-ink);
        text-align: center;
        text-decoration: none;
        font-size: clamp(.6875rem, 3vw, .8125rem);
        line-height: 1.25;
    }

    :is(.patient-mobile-shell, .guest-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) .patient-mobile-tabs a[aria-current] {
        color: var(--chrome-green-900);
        background: #e8f2f8;
        font-weight: 800;
    }

    [data-bs-theme="dark"] :is(.patient-mobile-shell, .guest-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) .patient-mobile-tabs a[aria-current] {
        color: #b6e8d4;
        background: #102d3b;
    }

    :is(.patient-mobile-shell, .guest-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) .patient-mobile-tabs a:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: -2px;
    }

    .patient-mobile-tabs svg {
        display: block;
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .patient-mobile-tabs .mobile-tab-has-updates {
        position: relative;
    }

    .patient-mobile-tabs .mobile-tab-has-updates::after {
        position: absolute;
        inset-block-start: -2px;
        inset-inline-end: -4px;
        width: 10px;
        height: 10px;
        border: 1px solid var(--chrome-surface-solid);
        border-radius: 50%;
        background: #dc2037;
        content: "";
    }

    .patient-mobile-book .patient-mobile-tab-icon {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        margin-top: -14px;
        transform: translateY(-8px);
        border: 2px solid var(--chrome-surface-solid);
        border-radius: 11px;
        color: white;
        background: linear-gradient(135deg, var(--chrome-green-900), var(--chrome-green-700));
    }
}

.patient-mobile-shell .patient-favorites-mobile {
    display: none;
}

@media (max-width: 720px) {
    .patient-mobile-shell .patient-favorites-desktop {
        display: none;
    }

    .patient-mobile-shell .patient-favorites-mobile {
        display: block;
    }

    .care-patient-portal nav.patient-favorites-mobile,
    .care-patient-portal nav.patient-records-tabs {
        display: grid;
        width: 100%;
    }

    .care-patient-portal nav.patient-favorites-mobile {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .care-patient-portal nav.patient-records-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .care-patient-portal :is(.patient-favorites-mobile, .patient-records-tabs) a {
        min-height: 44px;
        min-width: 0;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .care-patient-portal nav.patient-favorites-mobile a {
        padding-inline: 5px;
    }

    html:has(.patient-book-sheet[open]) {
        overflow: hidden;
    }

    .patient-book-sheet-backdrop:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 1023;
        background: rgb(3 32 25 / 67%);
    }

    .patient-book-sheet {
        position: fixed;
        inset: auto 0 var(--mobile-tabs-height, 51px);
        z-index: 1024;
        margin: 0;
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - var(--mobile-tabs-height, 51px) - 16px);
        overflow: auto;
        padding: 10px 16px 16px;
        border: 0;
        border-radius: 24px 24px 0 0;
        background: var(--chrome-surface-solid);
        color: var(--chrome-ink);
    }

    .patient-book-sheet[open] {
        animation: patient-book-sheet-rise .24s ease-out;
    }

    .patient-book-sheet-grip {
        width: 36px;
        height: 4px;
        margin-inline: auto;
        border-radius: 10px;
        background: var(--chrome-border-strong);
    }

    .patient-book-sheet-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-block: 4px;
    }

    .patient-book-sheet-heading h2 {
        margin: 0;
        color: var(--chrome-heading);
        font-size: 1.15rem;
    }

    .patient-book-sheet-close {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: none;
        border: 0;
        border-radius: 10px;
        color: inherit;
    }

    .patient-book-sheet a.patient-hub-link {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 58px;
        color: inherit;
        border-bottom: 1px solid var(--chrome-border);
        text-decoration: none;
    }

    .patient-book-sheet .dashboard-quick-icon {
        display: grid;
        flex: 0 0 42px;
        height: 42px;
        place-items: center;
        border-radius: 12px;
        background: var(--chrome-green-50);
        color: var(--chrome-green-800);
    }

    [data-bs-theme="dark"] .patient-book-sheet .dashboard-quick-icon {
        color: #b6e8d4;
    }

    .patient-book-sheet [data-care-type="Doctor"] {
        color: #246c8e;
        background: rgb(74 160 197 / 10%);
    }

    .patient-book-sheet [data-care-type="MedicalCenter"] {
        color: #7652a2;
        background: rgb(118 82 162 / 10%);
    }

    .patient-book-sheet [data-care-type="Pharmacy"] {
        color: #8c5c15;
        background: rgb(195 154 60 / 13%);
    }

    [data-bs-theme="dark"] .patient-book-sheet [data-care-type="Doctor"] {
        color: #a8e7f6;
    }

    [data-bs-theme="dark"] .patient-book-sheet [data-care-type="MedicalCenter"] {
        color: #d4caff;
    }

    [data-bs-theme="dark"] .patient-book-sheet [data-care-type="Pharmacy"] {
        color: #ffe1a0;
    }

    .patient-book-sheet svg {
        display: block;
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    @keyframes patient-book-sheet-rise {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}

@media (prefers-reduced-motion: reduce) {
    .patient-book-sheet[open] {
        animation: none;
    }
}

@media (max-width: 720px) {
    .patient-mobile-shell :is(.care-doctor-profile, .care-center-profile, .care-pharmacy-profile) .mobile-booking-bar {
        bottom: var(--mobile-tabs-height);
    }

    .patient-mobile-shell .care-directory .filter-drawer-backdrop.is-open {
        z-index: 1031;
    }

    .patient-mobile-shell .care-directory .filter-drawer.is-open {
        z-index: 1032;
    }
}

.care-patient-portal .favorite-doctor-mobile-actions {
    display: none;
}

@media (max-width: 720px) {
    .patient-mobile-shell .main-chat-blk[data-conversation-id]:not([data-conversation-id=""]) .chat.chat-messages {
        bottom: var(--mobile-tabs-height);
        height: auto;
        z-index: 1022;
    }

    .patient-mobile-shell .main-chat-blk[data-conversation-id]:not([data-conversation-id=""]) .chat.chat-messages > .slimscroll {
        flex: 1 1 auto;
        min-height: 0;
    }

    .patient-mobile-shell .care-patient-portal .favorite-doctor-desktop-book {
        display: none;
    }

    .patient-mobile-shell .care-patient-portal .favorite-doctor-mobile-actions {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 8px;
        margin-block-start: 10px;
    }

    .care-patient-portal .favorite-card .favorite-doctor-mobile-actions .btn {
        min-height: 44px;
        margin: 0;
    }

    .care-patient-portal .favorite-doctor-mobile-actions .favorite-doctor-view {
        padding-inline: 0;
    }
}

:is(.patient-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) a.mobile-more-account-deletion {
    display: none;
}

@media (max-width: 720px) {
    :is(.patient-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) a.mobile-more-account-deletion {
        display: flex;
        color: #b42332;
    }

    .mobile-more-account-deletion .feather-user-x {
        background: #fcebed;
        color: inherit;
    }

    [data-bs-theme="dark"] :is(.patient-mobile-shell, .doctor-mobile-shell, .pharmacy-mobile-shell) a.mobile-more-account-deletion {
        color: #ffa8b2;
    }

    [data-bs-theme="dark"] .mobile-more-account-deletion .feather-user-x {
        background: #47252f;
    }
}

.mobile-back-to-more {
    display: none;
}

@media (max-width: 720px) {
    .mobile-back-to-more {
        display: block;
        padding-block: 12px;
        background: var(--chrome-surface-solid);
    }

    .mobile-back-to-more a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 44px;
        padding: 6px 12px;
        border: 1px solid var(--chrome-border-strong);
        border-radius: 14px;
        color: var(--chrome-heading);
        font-weight: 750;
        text-decoration: none;
    }

    [dir="rtl"] .mobile-back-arrow {
        transform: scaleX(-1);
    }
}

@media (max-width: 720px) {
    html:has(.floating-tabs) {
        --mobile-tabs-height: calc(73px + env(safe-area-inset-bottom, 0px));
    }

    body .patient-mobile-tabs.floating-tabs {
        inset: auto max(8px, env(safe-area-inset-right, 0px))
            calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
        isolation: isolate;
        height: 58px;
        gap: 0;
        padding: 0 3px;
        border: 0;
        background: none;
        box-shadow: none;
    }

    body .patient-mobile-tabs.floating-tabs a,
    [data-bs-theme] body .patient-mobile-tabs.floating-tabs a[aria-current] {
        grid-template-rows: 23px auto;
        align-content: center;
        gap: 5px;
        padding: 2px 0;
        color: white;
        background: none;
        font-size: clamp(.5625rem, 2.8vw, .75rem);
        line-height: 1.15;
        text-decoration: none;
    }

    body .patient-mobile-tabs.floating-tabs a > span:last-child {
        overflow-wrap: normal;
    }

    .floating-tabs .patient-mobile-book .patient-mobile-tab-icon {
        width: 23px;
        height: 23px;
        margin: 0;
        transform: none;
        border: 0;
        background: none;
    }

    .floating-tabs .floating-tab-preview .patient-mobile-tab-icon {
        opacity: 0;
    }

    .floating-tabs svg.floating-tabs-rail,
    .floating-tabs .floating-tabs-orb {
        position: absolute;
        pointer-events: none;
    }

    .floating-tabs svg.floating-tabs-rail {
        inset: 0;
        z-index: -1;
        width: 100%;
        height: 100%;
        overflow: visible;
        fill: var(--chrome-green-950);
        stroke: color-mix(in srgb, var(--chrome-green-700) 65%, white);
        stroke-width: 1;
    }

    .floating-tabs .floating-tabs-orb {
        top: -11px;
        z-index: 2;
        display: grid;
        width: 40px;
        height: 40px;
        place-items: center;
        transform: translateX(-50%);
        transition-property: none;
        border: 1px solid color-mix(in srgb, var(--chrome-green-700) 55%, white);
        border-radius: 50%;
        color: white;
        background: radial-gradient(circle at 34% 20%, var(--chrome-green-700), var(--chrome-green-900) 78%);
        box-shadow: 0 0 13px color-mix(in srgb, var(--chrome-green-700) 45%, transparent);
    }

    .floating-tabs .floating-tabs-orb::after {
        inset-block-start: 7px;
        inset-inline-end: 4px;
    }

    .floating-tabs .floating-tabs-orb svg {
        width: 24px;
        height: 24px;
    }
}
