/* Phone layouts shared by the customer site and partner workspaces. */
body:is(.cn-page,.admin-body,.provider-shell) { font-size: .875rem; }

body :is(main,.cn-dialog) :is(
    select, textarea, input:not([type]),
    input:is([type="text"],[type="email"],[type="password"],[type="search"],[type="tel"],[type="url"],[type="date"],[type="time"],[type="datetime-local"],[type="number"],[type="file"])
) {
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    font-size: 1rem;
}

main :is(.button,.primary-action,.secondary-action,.dc-button,.ph-btn,.lb-btn,.hm-btn,.outline-button,.primary-profile-button,.cr-button,.reg-button,.provider-button,.pc-button) {
    min-height: 44px;
}

main :is(.table-wrap,.clinic-table-wrap,.seller-table-wrap) {
    max-width: 100%;
    overflow-x: auto;
}

body.cn-page main :is(.section,.dashboard-wrap,.profile-hero,.inner-hero,.directory-hero,.shop-hero,.checkout-wrap,.booking-wrap) {
    padding-block: 28px;
    padding-inline: 14px;
}

body.cn-page main .auth-copy { padding: 24px 16px; }
body.cn-page main .auth-card { padding: 22px 16px; }
body.cn-page main .dashboard-grid,
body.cn-page main .profile-grid { gap: 10px; }
body.cn-page main :is(.member-list,.document-list,.profile-summary,.care-tabs) :is(article,a) {
    overflow-wrap: anywhere;
}
body.cn-page main :is(.member-list,.document-list) article,
body.cn-page main :is(.profile-summary,.care-tabs) { flex-wrap: wrap; }
body.cn-page main .profile-summary a { white-space: normal; }

body.cn-page main :is(.dc,.ph,.lb) { max-width: calc(100% - 24px); }

body.cn-page main .hm {
    padding: 12px 12px 24px;
}

body.cn-page main :is(.hm-heading,.ph-heading,.lb-heading,.dc-section-head,.help-section-head):has(> :is(h1,h2) + a) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

body.cn-page main :is(.hm-heading,.ph-heading,.lb-heading,.dc-section-head,.help-section-head) > :is(h1,h2):has(+ a) {
    margin-block: 0;
    padding-block-start: 10px;
}

body.cn-page main :is(.hm-heading,.ph-heading,.lb-heading,.dc-section-head,.help-section-head) > :is(h1,h2) + a {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 4px;
    min-height: 44px;
    font-size: .75rem;
    white-space: nowrap;
}

body.cn-page main :is(.hm-categories,.ph-category-track) {
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 5px;
    padding: 5px 5px 9px;
    scrollbar-width: thin;
    scrollbar-color: #a9d3cb transparent;
}

body.cn-page main .hm-categories {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: clamp(7.125rem, 32vw, 8.25rem);
}

body.cn-page main .hm-categories > a {
    align-content: start;
    grid-template-rows: 42px auto;
    min-height: 104px;
    padding: 10px 7px;
    line-height: 1.3;
    overflow-wrap: break-word;
}

body.cn-page main .hm-categories .hm-thumb { width: 42px; height: 42px; }
body.cn-page main .ph-category-track { flex-wrap: nowrap; }
body.cn-page main .ph-category-track > a { flex: none; }
body.cn-page main :is(.hm-categories,.ph-category-track) > a { scroll-snap-align: start; }

body.cn-page main .hm .hm-trust {
    grid-template-columns: none;
    grid-auto-flow: column;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #a9d3cb transparent;
}

body.cn-page main .hm-trust .hm-thumb { width: 36px; height: 36px; }

body.cn-page main .hm-trust {
    grid-auto-columns: clamp(154px, 46vw, 198px);
    padding: 9px 10px;
    scroll-padding-inline: 10px;
}

body.cn-page main .hm .hm-trust > div {
    justify-content: flex-start;
    align-items: flex-start;
    padding-inline: 4px;
    border-left: 0;
    scroll-snap-align: start;
}

body.cn-page main .hm .hm-trust strong { font-size: .8125rem; line-height: 1.25; }
body.cn-page main .hm .hm-trust small { font-size: .75rem; line-height: 1.3; }

body:is(.clinic-body,.seller-body) :is(.clinic-main,.seller-main),
body.admin-body .admin-content {
    padding: 22px 12px;
}

body:is(.clinic-body,.seller-body) :is(.clinic-grid,.clinic-onboarding,.seller-onboarding) > *,
body.admin-body .admin-grid > * { min-width: 0; }

body:is(.clinic-body,.seller-body) :is(.clinic-form,.seller-form,.listing-form) { padding: 16px; }
body.admin-body .top-actions { flex-shrink: 0; }
body.admin-body .admin-topbar .crumb { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body.admin-body .admin-topbar .menu-toggle { min-width: 44px; min-height: 44px; }

@media (max-width: 360px) {
    body.cn-page main :is(.section-head,.dc-toolbar,.lb-toolbar,.ph-toolbar) { flex-wrap: wrap; gap: 7px; }
    body.cn-page main .profile-panel,
    body.cn-page main .checkout-form { padding: 13px; }
}

.provider-shell .lab-appointment-list > div {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
.provider-shell .lab-appointment-list > div > * { min-width: 0; }
.provider-shell .lab-appointment-list .status { display: inline-block; justify-self: start; }
.provider-shell .lab-appointment-list form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.provider-shell .lab-appointment-list form label { min-width: 0; flex: 1 1 12rem; }
.provider-shell .lab-appointment-list form :is(input,select) { display: block; width: 100%; }
.provider-shell .lab-appointment-list :is(small,b) { overflow-wrap: anywhere; }
