/* ============================================================================
   theme_mobile.css  (Paper St, 2026-06-13)  -- CostcoQuote Small Group flow
   ----------------------------------------------------------------------------
   Phone/tablet layout for the CostcoQuote Quote/Start form and its flow.
   TARGET = CostcoQuote markup: .SG_ContentWrapperForm / .SG_Quote_Content.
   (NOT cbcins .quoteContent -- that is a sibling brand; see ops/CBC-CODE-AND-REPO-SOT.md.)

   Source of truth for every selector/line below:
     code-map/00-MASTER-CODE-MAP.md, 02-CSS-MAP.md, 04-FORM-FLOW-MAP-STEP1.md
   Built against ~/cbc/CostcoQuote (origin CBCINS/CostcoQuote, master cb75a0b,
   branch paperst/smallgroup-mobile). Verified live source = costcoquote.com.

   ADDITIVE ONLY. No desktop rule in theme.css is edited. This sheet loads LAST
   (after theme.css / theme_extend.css / brands.css) so equal-specificity rules
   win the cascade without !important. !important appears ONLY where it must beat
   a per-field inline style="width:Nem" / style="float:Left" attribute, and is
   then scoped under .SG_Quote_Content so it cannot leak.

   HARD HAZARDS honored (00 sec 3):
     H1  Never display:none a subtree that holds a form control, and never hide a
         required field's parent: Validator.js:186 skips required fields whose
         parent is(":hidden") -> the field would silently pass validation.
         => We reflow by float/width ONLY. This sheet sets NO `display:none` on
            any element that contains an <input>/<select>.
     H2  JS owns the `display` of #WebsiteUrl_div / #mem_input / #Subsidy_Note /
         #LeadQuote_Reference_div. We touch float/width/typography only, NEVER
         their `display`. (fadeIn ends at display:block, so width overrides are
         safe when the field is revealed.)
     H3  Dialogs render in an IFRAME via _LayoutDialog.cshtml; parent CSS does NOT
         cascade in. This sheet must ALSO be <link>-ed inside _LayoutDialog.cshtml
         (modification-plan item 3) -- that is a markup step, not a CSS rule.
     H4  select2 (SIC field only) fails on touch. Phone decision = native <select>
         (coarse-pointer JS guard, modification-plan decision 1). The native
         control is styled below; the select2 container is also sized in case the
         widget stays for any surface.
   ========================================================================== */


/* ===========================================================================
   TIER 1 -- phones + small tablets (<=768px). The form fits any width >=570px
   already; below 570px the min-width floors force a whole-page side-scroll.
   This block releases the floors and makes every control thumb-usable.
   =========================================================================== */
@media only screen and (max-width: 768px) {

    /* --- 1. Release the two min-width floors (THE side-scroll fix) ---------
       02-CSS-MAP sec 1: .SG_Quote_Content{min-width:570px} (theme.css:1195) and
       .content{min-width:550px} (theme.css:80) freeze the form wider than the
       viewport. Release both; the float+<br class="clear"> scaffold then
       collapses to one column on its own. */
    .content {
        min-width: 0;
    }
    .SG_ContentWrapperForm {
        /* background image + relative position stay from theme.css:1188; this
           container does not clip. Just make it fluid. */
        max-width: 100%;
    }
    .SG_Quote_Content {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 14px;
        padding-right: 14px;
    }

    /* The inner layout table carries inline max-width:750px (shrinks fine), but
       guard it and its cells against any stray fixed width. */
    .SG_Quote_Content table {
        max-width: 100%;
    }
    .SG_Quote_Content td {
        padding-left: 0;
    }

    /* --- 2. Heading sizing -------------------------------------------------
       td.SG_ContentWrapperForm carries .fsize1_3; the H1 has inline
       padding-left:1rem. Keep it readable, pull it back to the gutter. */
    .SG_Quote_Content h1 {
        font-size: 1.45rem;
        line-height: 1.25;
        padding-left: 0 !important; /* beats inline style="padding-left:1rem" */
    }

    /* --- 3. Hide the decorative CSR photo ----------------------------------
       .quotePicSG: 400px, position:absolute, right:100px (theme.css:1370). It
       holds NO form control, so display:none is safe (H1 does not apply). */
    .quotePicSG {
        display: none;
    }

    /* --- 4. Tap targets: inputs + selects ----------------------------------
       02-CSS-MAP sec 4/5: underline-style inputs render ~18-24px tall; far under
       the 44px floor. font-size:16px also stops iOS Safari focus-zoom (<16px
       zooms). max-width:100% guards every inline em width against 320px overflow.
       We do NOT force width:100% -- small fields (Employees 4em) keep their
       natural width; the widest field (16.5em) is ~264px @16px < 320px. */
    .SG_Quote_Content input,
    .SG_Quote_Content select {
        min-height: 44px;
        font-size: 16px;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* The Effective-Date / marketing selects sit in .selectContainer, which
       clips at height:1.5em + overflow:hidden (theme.css:1926). Let the native
       control breathe to 44px so it is not clipped on a phone. */
    .SG_Quote_Content .selectContainer {
        height: auto;
        overflow: visible;
        top: 0;
    }
    .SG_Quote_Content .selectContainer select {
        height: auto;
    }
    /* select2 fallback (if the widget is kept on any surface): size the rendered
       container + single-selection box to the tap floor. Width is copied from
       the 11.25em source by select2 and is phone-safe (02-CSS-MAP sec 10). */
    .SG_Quote_Content .select2-container {
        max-width: 100%;
    }
    .select2-container .select2-selection--single {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* --- 5. Buttons: stack Previous/Next, 44px, unpin the absolute Previous -
       .blueButton.quote is position:absolute;left:0;bottom:2px (theme.css:4985)
       -> it overlaps content on a phone. Make both buttons full-width stacked
       blocks at the tap floor. Next keeps its .fsize1_5 font (untouched). */
    .SG_Quote_Content .blueButton,
    .SG_Quote_Content a.blueButton {
        box-sizing: border-box;
        min-height: 44px;
        line-height: 1.4;
        display: block;
        float: none !important;     /* beats inline/utility float */
        width: 100%;
        margin: 10px 0 0;
        text-align: center;
    }
    .SG_Quote_Content .blueButton.width150px,
    .SG_Quote_Content a.blueButton.width150px {
        width: 100%;                /* beats .width150px{width:150px} */
    }
    .SG_Quote_Content .blueButton.quote {
        position: static;           /* unpin the absolute Previous link */
        left: auto;
        bottom: auto;
    }

    /* --- 6. The Costco-membership tooltip bubble ---------------------------
       #mem_input .tooltip span carries inline width:400px; top:-8em; right:-50px
       (Start.cshtml:261) -> overflows a phone. Constrain it. The span is
       display-toggled on hover/focus by atooltip.css; we touch width/position
       only, never display (it holds no form control, but stay consistent). */
    #mem_input .tooltip span {
        width: auto !important;     /* beats inline width:400px */
        max-width: 84vw !important;
        right: auto !important;
        left: 0 !important;
        top: auto !important;
        bottom: 2.5em;
        box-sizing: border-box;
        white-space: normal;
    }

    /* --- 7. Conditional / JS-owned wrappers: float+width ONLY (H2) ----------
       When WebsiteYNDropdown fadeIns #WebsiteUrl_div (ends at display:block),
       the URL field should sit full-width below the Yes/No control. We set
       float/width only and NEVER `display` on any of these. */
    #WebsiteUrl_div,
    #mem_input,
    #LeadQuote_Reference_div,
    #Subsidy_Note {
        float: none !important;     /* beats inline style="float:Left" */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Stack the inline-floated field rows (Phone / Ext / PhoneType etc.) into
       one column. These divs use inline style="float:Left", so !important is
       required; scoped under the form so it cannot leak. The <br class="clear">
       breaks already separate field groups -- this only unfloats within a row. */
    .SG_Quote_Content form .floatLeft,
    .SG_Quote_Content form div[style*="float"] {
        float: none !important;
    }

    /* Error-message blocks (.notation) are absolutely positioned on desktop and
       can land off-screen on a phone; pin them static under their field. */
    .SG_Quote_Content .notation {
        position: static;
        left: auto;
    }

    /* The "Not required for a Quote" membership tooltip trigger renders ~17px
       tall (02-CSS-MAP sec 5) -- under the tap floor. Give it a real 44px hit
       area. It is a tooltip trigger, not a layout element, so padding is safe. */
    .SG_Quote_Content a.tooltip {
        display: inline-block;
        min-height: 44px;
        padding: 12px 4px;
        line-height: 1.5;
    }

    /* --- 8. Chrome: footer action buttons to the tap floor -----------------
       Footer columns already stack at 820px (theme.css:9216); the three buttons
       keep fixed px widths (225/193/142) + heights 29-35px. Make them fluid and
       tall enough. (These are chrome, lower priority than the form.) */
    .PhoneFooterBTN,
    .ChatFooterBTN,
    .EmailFooterBTN {
        float: none;
        width: 100%;
        max-width: 320px;
        min-height: 44px;
        margin: 6px auto;
    }
}


/* ===========================================================================
   TIER 2 -- small phones (<=480px). Sub-tier for the few things that only
   break below ~360-480px. Inherits everything from Tier 1.
   =========================================================================== */
@media only screen and (max-width: 480px) {

    /* Tighter gutter on the narrowest screens. */
    .SG_Quote_Content {
        padding-left: 10px;
        padding-right: 10px;
    }
    .SG_Quote_Content h1 {
        font-size: 1.3rem;
    }

    /* The open hamburger menu forces min-width:360px (theme.css:9404) + width:99vw
       (theme.css:9406) -> exceeds a 320px viewport by ~40px and side-scrolls.
       Cap it to the viewport. (02-CSS-MAP sec 8.) */
    .mobileMenu.open {
        min-width: 0 !important;    /* beats theme.css:9404 !important */
        width: 100vw !important;    /* beats theme.css:9406 !important */
        box-sizing: border-box;
    }
}


/* ============================================================================
   DOWNSTREAM SURFACES (step 2 census + its edit dialog; the cart/premium/plan
   surfaces extend the shared rules below as they are added). Additive; same
   hazards as step 1.
   Selector sources: code-map/03-DOWNSTREAM-STEPS-MAP.md + the views read
   (Employee/Index, EditEmployee, Edit/_Employee, Edit/_Dependent[s]).

   ⚠ SCOPING RULE: `.shoppingCartTable` is reused as BOTH a read-only/census
   DATA GRID and the edit-dialog FORM. They get opposite treatments, so every
   rule is scoped by ancestor:
     `.content .shoppingCartTable` = census/read-only -> HORIZONTAL SCROLL
                                     (keep columns; WCAG 1.4.10 exempts data tables)
     `.pad25  .shoppingCartTable`  = edit-dialog form -> STACK to a field list
                                     (labels via `data-label` added in the partials)
   ========================================================================== */
@media only screen and (max-width: 768px) {

    /* --- Shared: nav/action buttons (extend the step-1 set to green/gray) --- */
    .content .blueButton,  .content a.blueButton,
    .content .greenButton, .content a.greenButton,
    .content .grayButton,  .content a.grayButton {
        box-sizing: border-box; min-height: 44px; line-height: 1.4;
        display: block; float: none !important; width: 100%;
        margin: 10px 0 0; text-align: center;
    }
    .content .width150px, .content .width33 { width: 100% !important; }

    /* dialog Save/Cancel: the visible button is a <div> inside an <a> -------- */
    #btnSave, #btnCancel, #btnAddDependent { display: block; text-decoration: none; }
    #btnSave .greenButton, #btnCancel .greenButton,
    #btnSave .blueButton,  #btnCancel .blueButton {
        float: none !important; width: 100% !important; min-height: 44px;
        line-height: 1.6; box-sizing: border-box; margin: 8px 0 0;
    }

    /* --- Shared: absolutely-positioned error notations go static ----------- */
    .content .notation, .pad25 .notation {
        position: static !important; left: auto !important; width: auto !important;
    }

    /* --- Shared: dialog (colorbox iframe) body fills the phone ------------- */
    .pad25 { padding: 12px !important; box-sizing: border-box; max-width: 100%; }
    .pad25 > div[style*="max-height"] { max-height: none !important; overflow-y: visible !important; }

    /* === STEP 2 census PAGE table: horizontal scroll + sticky first column ==
       13-col edit grid (decision B1). Keep the grid, let it scroll; freeze the
       first column as the read anchor. Reflow only; no field hidden.
       Scoped to :has(.colHeading) so it hits ONLY real data grids (the census
       table has a .colHeading header row); single-row LAYOUT tables that reuse
       .shoppingCartTable for chrome (e.g. ThankYou's "What Next?" box) have no
       .colHeading and keep normal wrapping instead of nowrap-scrolling.
       :has() is Baseline 2023; guarded by @supports so a pre-:has() engine skips
       the block cleanly (no adjacent-rule fallout) and the grid degrades to
       default-wide (scrolls the page) rather than breaking. */
    @supports selector(:has(*)) {
    .content .shoppingCartTable:has(.colHeading) {
        display: block; width: auto; max-width: 100%;
        overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap;
    }
    .content .shoppingCartTable:has(.colHeading) tr > :first-child {
        position: sticky; left: 0; z-index: 2;
        box-shadow: 2px 0 4px rgba(0,0,0,.10);
    }
    /* opaque bg ONLY on data cells (td); the .colHeading header th keeps its own
       #f9f9f9 background so the frozen first column's header is not painted over. */
    .content .shoppingCartTable:has(.colHeading) tr > td:first-child {
        background: #fff;
    }
    }
    /* census row action icons (pencil / trash) to a real tap size */
    .content .shoppingCartTable .btnEdit,
    .content .shoppingCartTable .btnRemove,
    .content .shoppingCartTable .fsize1_4 a {
        display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px;
        text-align: center;
    }

    /* === STEP final ThankYou: floated 33/60 content columns + 2 nav buttons =====
       The "What Next?" box floats a width33 checklist image beside a width60 text
       column; both stack on a phone. Buttons already stacked by the .content
       button rule above. (Table itself keeps normal wrapping -- no .colHeading.) */
    .content .width60, .content .marginLeft1em.width33 {
        float: none !important; width: 100% !important; box-sizing: border-box;
        margin-left: 0;
    }

    /* === EDIT-EMPLOYEE dialog forms: STACK into a labeled field list ========
       _Employee (8-col) + _Dependent (7-col) inside .pad25. Hide the header
       rows; each <td> shows its label via data-label (added in the partials).
       Inputs go full-width + 44px. Hazard 1 honored: this restacks FORM tables
       by display only on wrappers; no required field's parent is display:none
       and every control stays visible. */
    .pad25 .shoppingCartTable,
    .pad25 .shoppingCartTable tbody,
    .pad25 .shoppingCartTable tr,
    .pad25 .shoppingCartTable td { display: block; width: 100%; box-sizing: border-box; }
    .pad25 .shoppingCartTable .colHeading { display: none; }      /* labels -> td::before */
    .pad25 .shoppingCartTable .tableTitle {
        display: block; width: 100%; box-sizing: border-box;
        font-size: 1.2rem; padding: 10px 0 4px;
    }
    .pad25 .shoppingCartTable td { position: relative; padding: 6px 0 10px; border: 0; }
    .pad25 .shoppingCartTable td[data-label]::before {
        content: attr(data-label); display: block;
        font-weight: 600; font-size: .9rem; margin-bottom: 3px; color: #444;
        white-space: normal;
    }
    /* each dependent becomes a card */
    .pad25 .shoppingCartTable .DependentRowItem {
        border: 1px solid #ddd; border-radius: 6px; padding: 8px 12px; margin: 10px 0;
    }
    /* full-width, tap-sized controls (beat inline em widths) */
    .pad25 .shoppingCartTable input,
    .pad25 .shoppingCartTable select {
        width: 100% !important; max-width: 100%; box-sizing: border-box;
        min-height: 44px; font-size: 16px;
    }
    .pad25 .shoppingCartTable .selectContainer {
        width: 100% !important; height: auto; overflow: visible; top: 0; margin-top: 0 !important;
    }
    .pad25 #pnlAddDependent td a, .pad25 #pnlAddDependent td {
        display: block; min-height: 44px; line-height: 44px; text-align: left;
    }
    /* dependent delete: full-width tap row under its "Delete" label */
    .pad25 .shoppingCartTable .DependentRowItem td:last-child a,
    .pad25 .shoppingCartTable a[class*="btnRemoveDependent"] {
        display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; text-align: center;
    }

    /* === DIALOG SURFACES: shared chrome inside the _LayoutDialog colorbox iframe ==
       Cart / Premium / Plan dialogs wrap content in .contentWrapper.quote_wrapper
       (_LayoutDialog.cshtml:232) and render their action buttons + tables DIRECTLY
       under it -- NO .content and (for the cart/premium) NO .pad25 ancestor, so the
       step-page (.content) and edit-form (.pad25) rules above do not reach them.
       NOTE: .quote_wrapper is NOT dialog-only -- ALL THREE layouts wrap in it
       (_Layout.cshtml:486, _Layout2.cshtml:257, _LayoutDialog.cshtml:232), so every full
       page (Step 1, census, ThankYou, PlanResults via root _ViewStart -> _Layout) sits
       under it too. That is safe here: every rule below either
       targets a child class that exists ONLY on a dialog surface (.flexAlignRight,
       .b-feild-label, #planSuggestion_scroll, .compareTable:has..., #btnRecalPremiums),
       or is the generic button stack, which is exactly the mobile treatment those full
       pages already get from the .content button rule (verified: census + ThankYou gate
       clean with this applied). So the overlap is harmless, not a leak.
       This also harmlessly re-covers the EditEmployee Save/Cancel buttons with the
       same float:none/width:100% they already get from the #btnSave/#btnCancel rules. */
    .quote_wrapper .blueButton,  .quote_wrapper a.blueButton,
    .quote_wrapper .greenButton, .quote_wrapper a.greenButton,
    .quote_wrapper .grayButton,  .quote_wrapper a.grayButton {
        box-sizing: border-box; min-height: 44px; line-height: 1.4;
        display: block; float: none !important; width: 100%;
        margin: 10px 0 0; text-align: center;
    }
    .quote_wrapper .width150px, .quote_wrapper .width33 { width: 100% !important; }
    /* .flexAlignRight is float:right;display:flex (theme.css:4068) -> the two cart
       buttons sit on one row; unfloat + block so they stack full-width. */
    .quote_wrapper .flexAlignRight { float: none !important; display: block; }
    .quote_wrapper .notation {
        position: static !important; left: auto !important; width: auto !important;
    }

    /* === STEP "Cart": ViewCart 5-col read-only grid -> scroll + sticky first col ==
       .shoppingCartTable.pop carries min-width:925px (theme.css:4058) which freezes
       the cart wider than the phone. Release it; the wide nowrap grid then scrolls
       INSIDE the block (the page does not side-scroll). Freeze the Plan column as the
       read anchor so the carrier/plan stays visible while you scroll to the price.
       The Plan column wraps (it is wide); the data columns stay nowrap and scroll.
       The carrier logo is a FIXED <img width="200"> -> cap it to the cell. */
    .shoppingCartTable.pop {
        display: block; width: auto; min-width: 0; max-width: 100%;
        overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap;
    }
    .shoppingCartTable.pop tr > :first-child {
        position: sticky; left: 0; z-index: 2;
        white-space: normal; max-width: 190px;
        box-shadow: 2px 0 4px rgba(0,0,0,.10);
    }
    /* opaque bg ONLY on data cells; the .colHeading "Plan" header th keeps #f9f9f9. */
    .shoppingCartTable.pop tr > td:first-child { background: #fff; }
    .shoppingCartTable.pop .resultCarrierLogo img,
    .shoppingCartTable.pop img {
        max-width: 100% !important; height: auto;       /* beats inline width="200" */
    }
    /* the totals row spans all 5 cols (colspan=5); keep it readable, not frozen */
    .shoppingCartTable.pop tr.totals > :first-child {
        position: static; white-space: normal; max-width: none; box-shadow: none;
    }
    /* Change / Remove / Plan Details inline links to a real tap height */
    .shoppingCartTable.pop .CartPlanRowField a {
        display: inline-block; min-height: 44px; line-height: 44px;
    }

    /* --- Recommend-plans upsell carousel (renders in the cart dialog only) ---
       Desktop is a dw_scrollObj arrow-button scroller: #scrollLinks (table) >
       SP-ScrollBtn | #planSuggestion_scroll (overflow:hidden, width:90%, the
       table-cell viewport) | SP-ScrollBtn, holding .suggestedPlanCard cells at
       min-width:14em. On a phone that table + its cells overflow the viewport and
       the arrow buttons are tiny. Convert it to a single native horizontal-swipe
       scroller capped to the viewport; drop the desktop arrows. */
    .quote_wrapper #scrollLinks { display: block; width: 100%; max-width: 100%; }
    .quote_wrapper #scrollLinks tbody,
    .quote_wrapper #scrollLinks tr { display: block; }
    .quote_wrapper .SP-ScrollBtn { display: none; }       /* arrows -> native swipe */
    .quote_wrapper #planSuggestion_scroll {
        display: block; width: 100% !important; max-width: 100% !important;
        height: auto; overflow-x: auto; -webkit-overflow-scrolling: touch;
        white-space: nowrap; border: 0;
    }
    .quote_wrapper #lyr1 { display: block; overflow: visible; }
    .quote_wrapper #t1 { display: inline-flex; gap: 8px; }
    .quote_wrapper .planCardWrapper { display: inline-block; vertical-align: top; }
    .quote_wrapper .suggestedPlanCard {
        display: inline-block; white-space: normal; height: auto;
    }
    /* in-card tap targets to the floor (Plan Details link + the corner add button) */
    .quote_wrapper .suggestedPlanCard .resultTextLink {
        display: inline-block; min-height: 44px; line-height: 44px;
    }
    .quote_wrapper .suggestedPlanCardAddBtn {
        width: 32px !important; height: 32px !important; right: -6px; top: -6px;
    }

    /* === SHARED: plan result card (.resultContainer) ======================
       Rendered in the step-3 plan list AND embedded in the Premium / Recalculate
       dialogs (IsInDialog). Desktop = three display:table-cell columns
       (resultLeft 15.5em | resultCenter | resultRight 15.625em) in a fixed-height
       display:table container (theme.css:2279,2415,2428,2742). Stack to one column,
       release the fixed height, turn the 5-across benefit strip into a 2-up grid,
       stack the 3-col premium-summary row + the blue apply block. These are
       card-only classes (no scope needed); this sheet loads last so display wins
       the cascade without !important -- !important is used only to beat the inline
       style="width:N%" on the benefit cells. */
    .resultContainer { display: block; width: 100%; height: auto; }
    .resultLeft, .resultCenter,
    .resultRight, .resultRightSelected {
        display: block; width: 100%; height: auto; box-sizing: border-box;
    }
    .resultLeft .resultCarrierLogo img { max-width: 200px; height: auto; }
    /* plan-name links (Plan Details | Network Providers | Formulary | ...) to tap floor */
    .resultLeft .resultTextLink {
        display: inline-block; min-height: 44px; line-height: 44px; vertical-align: middle;
    }
    /* 5-across benefit strip -> 2-up grid (beats inline 17/15/18/25/25% widths) */
    .resultsDataTable { display: flex; flex-wrap: wrap; }
    .resultsDataTableTD {
        display: block; width: 50% !important; box-sizing: border-box;
        height: auto; border-left: 0;
    }
    /* 3-col premium-summary row (EE / Dependent / Premium-Breakdown links) -> stack */
    .premiumSummaryDataTable { display: block; }
    .premiumSummaryDataTD {
        display: block; border-left: 0; border-top: 1px dotted #97c2f1; text-align: left;
    }
    /* real breakdown links stack full-row; the bare "|" separator <a> (no href)
       is decorative -> hide it (no content loss) so it is not a 3px tap target */
    .premiumSummaryDataTD a[href] {
        display: block; min-height: 44px; line-height: 44px;
    }
    .premiumSummaryDataTD a:not([href]) { display: none; }
    /* Compare checkbox: 24px box (WCAG 2.2 AA target floor) with a 44px label row */
    .resultCompareDiv input[type="checkbox"] { width: 24px; height: 24px; }
    .resultCompareDiv label {
        display: inline-block; min-height: 44px; line-height: 44px; vertical-align: middle;
    }
    /* the blue Add-to-Cart block reads as a full-width banner when stacked */
    .resultRight, .resultRightSelected { padding: 14px; }
    /* featured plans: the absolute 18em tab/backdrop must not push the viewport */
    .featuredTab { max-width: 100%; box-sizing: border-box; }

    /* === Premium dialog: the 6-col "Employee Premium Details" .compareTable ===
       Two .compareTable tables render in PremiumSummary: a 2-col key/value summary
       (wraps fine, left alone) and a 6-col read-only details grid. Give ONLY the
       6-col grid the scroll+sticky-first-col data-table treatment; identify it by
       its .planDetailTableHdrLightBlue header row via :has(). :has() is Baseline
       2023; guarded by @supports so a pre-:has() engine skips the block cleanly and
       the grid degrades to default-wide. WCAG 1.4.10 exempts data tables from reflow. */
    @supports selector(:has(*)) {
    .quote_wrapper .compareTable:has(.planDetailTableHdrLightBlue),
    .content .compareTable:has(.planDetailTableHdrLightBlue) {
        display: block; width: auto; max-width: 100%;
        overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap;
    }
    /* freeze only true first-column cells. Full-width section/total rows use a single
       colspan cell -> excluded via :not([colspan]) so their native header style (white
       text on blue, e.g. Medical/Hospital/Prescription Drugs) stays visible. */
    .quote_wrapper .compareTable:has(.planDetailTableHdrLightBlue) tr > :first-child:not([colspan]),
    .content .compareTable:has(.planDetailTableHdrLightBlue) tr > :first-child:not([colspan]) {
        position: sticky; left: 0; z-index: 2;
        white-space: normal; box-shadow: 2px 0 4px rgba(0,0,0,.10);
    }
    /* opaque bg ONLY on data cells (td). The first column's HEADER cells are colored
       th's with WHITE text -- the dark-blue plan-name header (.planDetailTableHdrDarkBlue)
       and the light-blue census header (th inside tr.planDetailTableHdrLightBlue). A white
       sticky bg painted those white-on-white = invisible header (a11y-gate catch 2026-06-13).
       Leaving th's alone keeps their native colored bg (white text stays legible: 6.7:1 /
       4.5:1) AND they still freeze via the sticky rule above. */
    .quote_wrapper .compareTable:has(.planDetailTableHdrLightBlue) tr > td:first-child:not([colspan]),
    .content .compareTable:has(.planDetailTableHdrLightBlue) tr > td:first-child:not([colspan]) {
        background: #fff;
    }
    }

    /* === STEP 3 plan results: the .sortingDiv filter bar ===================
       A one-row, |-delimited control strip: Filter By + Carrier/PlanType/
       (OfficeCopay)/PlanTier multiselects (jquery.multi-select -> .multi-select-
       container/.multi-select-button width:8em, .multi-select-menu absolute,
       theme.css:2136) + Premium from/to text inputs + Filter/Reset buttons. Stack
       it: each control full-width + tap-sized; constrain the absolute dropdown menu
       to the viewport so it cannot render off-screen. font-size:0 on the row kills
       the stray bare-text "|" separators + whitespace (they are text nodes, not
       elements); children restore their size. */
    .sortingDiv { font-size: 0; line-height: 1.4; }
    .sortingDiv > strong, .sortingDiv > label,
    .sortingDiv input, .sortingDiv button,
    .sortingDiv .multi-select-container { font-size: 1rem; }
    /* (.sortingDiv span left at font-size:0 on purpose -> collapses the stray
       <span>|</span> separator; the plugin's own spans inherit 1rem from
       .multi-select-container above, so the widget text stays sized.) */
    .sortingDiv > strong, .sortingDiv > label {
        display: block; margin: 12px 0 4px;
    }
    .sortingDiv .multi-select-container { display: block; width: 100%; margin: 4px 0; }
    .sortingDiv .multi-select-button {
        width: 100% !important; height: auto; min-height: 44px;
        box-sizing: border-box; white-space: normal; text-align: left;
    }
    .sortingDiv .multi-select-menu { min-width: 100%; max-width: 100%; }
    .sortingDiv .multi-select-menuitems { max-width: 100%; }
    .sortingDiv input[type="text"], .sortingDiv .AmountField, .sortingDiv .PercentField {
        display: block; width: 100% !important; box-sizing: border-box;
        min-height: 44px; font-size: 16px; margin: 4px 0;
    }
    .sortingDiv button.blueButton {
        display: block; width: 100%; min-height: 44px; box-sizing: border-box;
        margin: 8px 0 0; text-align: center; float: none;
    }

    /* === STEP 3 dialogs: ChangeContribution / PlanContribution ============
       These dialog views use classes (.b-feild-label, .cs_tt_button_dialog,
       .bblue-box, .plandethed, .epdinfo*, .empl-box ...) that are defined in NO
       loaded stylesheet, so the elements are plain block divs; their only mobile
       hazards are the INLINE fixed widths/floats. Neutralize those so the dialogs
       read as clean full-width stacked field lists. Scoped to .quote_wrapper. */
    .quote_wrapper .b-feild-label {
        display: block; width: 100% !important; float: none !important;
        box-sizing: border-box; margin-bottom: 6px;
    }
    .quote_wrapper .b-feild-label > div[style*="float"] {
        float: none !important; width: 100%;
    }
    .quote_wrapper .b-feild-label select,
    .quote_wrapper .b-feild-label input,
    .quote_wrapper .empl-box select,
    .quote_wrapper .empl-box input[type="text"] {
        width: 100% !important; box-sizing: border-box; min-height: 44px; font-size: 16px;
    }
    /* Save / Cancel: .cs_tt_button_dialog (inline width:120px) inside a wrapper
       with inline float:left;padding-left:27% -> full-width stacked buttons. */
    .quote_wrapper .cs_tt_button_dialog {
        width: 100% !important; box-sizing: border-box; margin: 8px 0 !important;
        min-height: 44px; text-align: center;
    }
    .quote_wrapper .cs_tt_button_dialog a {
        display: block; min-height: 44px; line-height: 44px;
    }
    .quote_wrapper div[style*="padding-left:27%"],
    .quote_wrapper div[style*="padding-left: 27%"] {
        padding-left: 0 !important; float: none !important; width: 100%;
    }
    /* PlanContribution recalculate button (plain <input type=button>) + 130px logo */
    .quote_wrapper #btnRecalPremiums {
        display: block; width: 100%; min-height: 44px; box-sizing: border-box;
        margin: 8px 0; font-size: 16px;
    }
    .quote_wrapper .b-image img { max-width: 100%; height: auto; }
}
