/*
 * portal-bs3-bridge.css
 * ----------------------------------------------------------------------------
 * Transitional Bootstrap 3 -> Bootstrap 5 VISUAL bridge for ClientPortalV2.
 *
 * The CPV2 shell loads Bootstrap 5 (requirements FR-6) and the chrome/shell is
 * converted to native BS5. Feature views, however, are converted to BS5
 * incrementally (NFR: feature-by-feature parity over broad refactors). Until a
 * view is converted it still uses Bootstrap 3 framework utilities that BS5
 * removed (img-responsive, visible/hidden tiers, col-xs-*, caret, panel, well,
 * pull-*, etc.). Without these, unconverted pages render broken under BS5
 * (e.g. full-size hero images, columns that do not size).
 *
 * This file re-implements those dropped BS3 utilities and re-skins the BS5
 * shell navbar (#navbarContainer) with the dash theme colors so the menu looks
 * the same as the live ClientPortal site.
 *
 * It is a temporary compatibility layer: as each feature view is fully migrated
 * to native BS5 markup, its reliance on these rules goes away. Remove rules
 * here once no surface depends on them.
 *
 * Tenant branding: ~/Css/child.css loads last in shell layouts (after portal-bs3-bridge).
 * Do not override child.css colors/fonts with !important in this file.
 * ----------------------------------------------------------------------------
 */
:root {
   --bs-emphasis-color: #333;
    --bs-emphasis-color-rgb: 51, 51, 51;
}
.h4, h4 {
    font-size: 18px;
}
/* ===========================================================================
 * 1. Responsive image + float utilities (BS3)
 * ======================================================================== */
.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

.img-rounded {
    border-radius: 6px;
}

.img-circle {
    border-radius: 50%;
}

.img-thumbnail {
    padding: 4px;
    line-height: 1.42857143;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

.center-block {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

.pull-right {
    float: right !important;
}

.pull-left {
    float: left !important;
}

/* ===========================================================================
 * 2. Responsive visibility utilities (BS3)
 *    Breakpoints: xs <768, sm 768-991, md 992-1199, lg >=1200
 * ======================================================================== */
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg,
.visible-xs-block, .visible-xs-inline, .visible-xs-inline-block,
.visible-sm-block, .visible-sm-inline, .visible-sm-inline-block,
.visible-md-block, .visible-md-inline, .visible-md-inline-block,
.visible-lg-block, .visible-lg-inline, .visible-lg-inline-block {
    display: none !important;
}

@media (max-width: 767px) {
    .visible-xs {
        display: block !important;
    }

    table.visible-xs {
        display: table !important;
    }

    tr.visible-xs {
        display: table-row !important;
    }

    th.visible-xs, td.visible-xs {
        display: table-cell !important;
    }

    .visible-xs-block {
        display: block !important;
    }

    .visible-xs-inline {
        display: inline !important;
    }

    .visible-xs-inline-block {
        display: inline-block !important;
    }

    .hidden-xs {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .visible-sm {
        display: block !important;
    }

    table.visible-sm {
        display: table !important;
    }

    tr.visible-sm {
        display: table-row !important;
    }

    th.visible-sm, td.visible-sm {
        display: table-cell !important;
    }

    .visible-sm-block {
        display: block !important;
    }

    .visible-sm-inline {
        display: inline !important;
    }

    .visible-sm-inline-block {
        display: inline-block !important;
    }

    .hidden-sm {
        display: none !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .visible-md {
        display: block !important;
    }

    table.visible-md {
        display: table !important;
    }

    tr.visible-md {
        display: table-row !important;
    }

    th.visible-md, td.visible-md {
        display: table-cell !important;
    }

    .visible-md-block {
        display: block !important;
    }

    .visible-md-inline {
        display: inline !important;
    }

    .visible-md-inline-block {
        display: inline-block !important;
    }

    .hidden-md {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .visible-lg {
        display: block !important;
    }

    table.visible-lg {
        display: table !important;
    }

    tr.visible-lg {
        display: table-row !important;
    }

    th.visible-lg, td.visible-lg {
        display: table-cell !important;
    }

    .visible-lg-block {
        display: block !important;
    }

    .visible-lg-inline {
        display: inline !important;
    }

    .visible-lg-inline-block {
        display: inline-block !important;
    }

    .hidden-lg {
        display: none !important;
    }
}

.visible-print {
    display: none !important;
}

@media print {
    .visible-print {
        display: block !important;
    }

    .hidden-print {
        display: none !important;
    }

    #overlay-waiting,
    #overlay-waiting #loading {
        display: none !important;
    }

    /* Enrollment print: readable text (BS5 disabled fields print faint otherwise). */
    [data-cpv2-module="enrollment-ko"] .form-control:disabled,
    [data-cpv2-module="enrollment-ko"] .form-control[disabled],
    [data-cpv2-module="enrollment-ko"] select.form-control:disabled,
    [data-cpv2-module="enrollment-ko"] select.form-control[disabled] {
        color: #333 !important;
        -webkit-text-fill-color: #333 !important;
        background-color: #fff !important;
        border: 1px solid #999 !important;
        opacity: 1 !important;
    }

    [data-cpv2-module="enrollment-ko"] #demographics-section .form-control.enrollment-draft-required {
        background-color: #fff5ca !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    [data-cpv2-module="enrollment-ko"] .panel-title,
    [data-cpv2-module="enrollment-ko"] h2,
    [data-cpv2-module="enrollment-ko"] h3,
    [data-cpv2-module="enrollment-ko"] h4,
    [data-cpv2-module="enrollment-ko"] .form-label {
        color: #333 !important;
    }

    /* Enrollment print layout (PrintEnrollmentBenefits / window.print). */
    @page {
        margin: 0.45in;
    }

    body[data-testid="cpv2-shell"] > #mainwrapper,
    body[data-testid="cpv2-shell"] #mainwrapper.wrapper,
    [data-cpv2-module="enrollment-ko"],
    [data-cpv2-module="enrollment-ko"] #accordionEnroll {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        overflow: visible !important;
    }

    [data-cpv2-module="enrollment-ko"] .enrollment-page-intro .h2-sub-heading,
    [data-cpv2-module="enrollment-ko"] .usernameLable .btnColor {
        display: none !important;
    }

    [data-cpv2-module="enrollment-ko"] .enrollment-group-header > .col-3,
    [data-cpv2-module="enrollment-ko"] .enrollment-group-header > .col-xs-3 {
        display: none !important;
    }

    [data-cpv2-module="enrollment-ko"] .enrollment-group-header > .col-9,
    [data-cpv2-module="enrollment-ko"] .enrollment-group-header > .col-xs-9 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    [data-cpv2-module="enrollment-ko"] .panel-collapse,
    [data-cpv2-module="enrollment-ko"] .panel-collapse.collapse,
    [data-cpv2-module="enrollment-ko"] .panel-collapse.collapse.in,
    [data-cpv2-module="enrollment-ko"] .panel-collapse.collapse.show {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        visibility: visible !important;
    }

    [data-cpv2-module="enrollment-ko"] .panel-body {
        overflow: visible !important;
        height: auto !important;
        padding: 8px 10px !important;
    }

    [data-cpv2-module="enrollment-ko"] .panel {
        overflow: visible !important;
        break-inside: auto;
        page-break-inside: auto;
    }

    [data-cpv2-module="enrollment-ko"] .form-group {
        margin-bottom: 8px !important;
        overflow: visible !important;
    }

    [data-cpv2-module="enrollment-ko"] .row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    [data-cpv2-module="enrollment-ko"] .row > [class*="col-"] {
        float: none !important;
        box-sizing: border-box;
        padding-left: 6px !important;
        padding-right: 6px !important;
        margin-left: 0 !important;
    }

    [data-cpv2-module="enrollment-ko"] [class*="offset-"],
    [data-cpv2-module="enrollment-ko"] .col-xs-offset-1,
    [data-cpv2-module="enrollment-ko"] .col-md-offset-1 {
        margin-left: 0 !important;
    }

    [data-cpv2-module="enrollment-ko"] .col-sm-4,
    [data-cpv2-module="enrollment-ko"] .col-xs-4 {
        width: 33.33333333% !important;
        max-width: 33.33333333% !important;
        flex: 0 0 33.33333333% !important;
    }

    [data-cpv2-module="enrollment-ko"] .col-sm-6,
    [data-cpv2-module="enrollment-ko"] .col-xs-6 {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }

    [data-cpv2-module="enrollment-ko"] .col-sm-12,
    [data-cpv2-module="enrollment-ko"] .col-xs-12,
    [data-cpv2-module="enrollment-ko"] .col-md-12 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    [data-cpv2-module="enrollment-ko"] .col-md-9,
    [data-cpv2-module="enrollment-ko"] .col-sm-10,
    [data-cpv2-module="enrollment-ko"] .col-md-2 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    [data-cpv2-module="enrollment-ko"] #demographics-section .panel-body > .form-group:first-child .col-xs-3,
    [data-cpv2-module="enrollment-ko"] #demographics-section .panel-body > .form-group:first-child .col-xs-2,
    [data-cpv2-module="enrollment-ko"] #demographics-section .panel-body > .form-group:first-child .col-xs-1 {
        display: none !important;
    }

    [data-cpv2-module="enrollment-ko"] #demographics-section .panel-body > .form-group:first-child .col-xs-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    [data-cpv2-module="enrollment-ko"] .btn,
    [data-cpv2-module="enrollment-ko"] button:not([type="checkbox"]):not([type="radio"]) {
        display: none !important;
    }

    [data-cpv2-module="enrollment-ko"] .slider,
    [data-cpv2-module="enrollment-ko"] .slider-track,
    [data-cpv2-module="enrollment-ko"] input[name="eventHistorySlider"] {
        display: none !important;
    }

    [data-cpv2-module="enrollment-ko"] .form-control,
    [data-cpv2-module="enrollment-ko"] select.form-control {
        min-height: 28px !important;
        height: auto !important;
        padding: 4px 8px !important;
        margin-bottom: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
    }

    [data-cpv2-module="enrollment-ko"] textarea.form-control {
        min-height: 56px !important;
        height: auto !important;
    }

    [data-cpv2-module="enrollment-ko"] .table-responsive {
        overflow: visible !important;
    }

    [data-cpv2-module="enrollment-ko"] table {
        width: 100% !important;
        break-inside: auto;
        page-break-inside: auto;
    }

    [data-cpv2-module="enrollment-ko"] #dependentGrid table thead th:first-child,
    [data-cpv2-module="enrollment-ko"] #dependentGrid table tbody td:first-child {
        display: none !important;
    }

    [data-cpv2-module="enrollment-ko"] .border_Bottom {
        margin-bottom: 6px !important;
        margin-top: 8px !important;
    }

    [data-cpv2-module="enrollment-ko"] .btn {
        margin-bottom: 0 !important;
    }

    [data-cpv2-module="enrollment-ko"] #elections-section .elections-step2-options,
    [data-cpv2-module="enrollment-ko"] #elections-section .elections-step2-options .list-feature,
    [data-cpv2-module="enrollment-ko"] #elections-section .elections-step2-options .list-feature li {
        padding-left: 0 !important;
        margin-left: 0 !important;
        text-align: left !important;
    }

    [data-cpv2-module="enrollment-ko"] form > .panel.panel-default {
        margin-bottom: 2px !important;
    }
}

/* ===========================================================================
 * 3. Extra-small grid columns + offsets (BS3) — integrate with BS5 flex .row
 *    (BS5 dropped the xs tier; col-* with no infix is the BS5 equivalent but
 *    legacy views still author col-xs-*.)
 * ======================================================================== */
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6,
.col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
    flex: 0 0 auto;
    position: relative;
    /* Width intentionally NOT set here. A `width: 100%` at this (0,1,0) specificity
       loads after bootstrap5.css and would beat BS5's `.col-sm-*`/`.col-md-*`
       (also 0,1,0) at every breakpoint, forcing `col-xs-12 col-md-8` layouts to
       stack. The per-number widths come from the zero-specificity :where() rules
       below, so BS5's responsive tiers win at their media queries. */
}

/* Widths/offsets are wrapped in :where() so they carry ZERO specificity. BS3
 * authored `col-xs-* col-sm-*` expecting the larger tier to win at its
 * breakpoint, but this bridge loads AFTER bootstrap5.css, so a plain
 * `.col-xs-12` would beat `.col-sm-9` (equal specificity, later in source) at
 * every width and force columns to stack. With :where(), BS5's `.col-sm-*` /
 * `.col-md-*` (specificity 0,1,0) override the xs width at their media query,
 * while `col-xs-*` used alone still applies. Fixes column stacking app-wide. */
:where(.col-xs-12) { width: 100%; }
:where(.col-xs-11) { width: 91.66666667%; }
:where(.col-xs-10) { width: 83.33333333%; }
:where(.col-xs-9) { width: 75%; }
:where(.col-xs-8) { width: 66.66666667%; }
:where(.col-xs-7) { width: 58.33333333%; }
:where(.col-xs-6) { width: 50%; }
:where(.col-xs-5) { width: 41.66666667%; }
:where(.col-xs-4) { width: 33.33333333%; }
:where(.col-xs-3) { width: 25%; }
:where(.col-xs-2) { width: 16.66666667%; }
:where(.col-xs-1) { width: 8.33333333%; }

:where(.col-xs-offset-11) { margin-left: 91.66666667%; }
:where(.col-xs-offset-10) { margin-left: 83.33333333%; }
:where(.col-xs-offset-9) { margin-left: 75%; }
:where(.col-xs-offset-8) { margin-left: 66.66666667%; }
:where(.col-xs-offset-7) { margin-left: 58.33333333%; }
:where(.col-xs-offset-6) { margin-left: 50%; }
:where(.col-xs-offset-5) { margin-left: 41.66666667%; }
:where(.col-xs-offset-4) { margin-left: 33.33333333%; }
:where(.col-xs-offset-3) { margin-left: 25%; }
:where(.col-xs-offset-2) { margin-left: 16.66666667%; }
:where(.col-xs-offset-1) { margin-left: 8.33333333%; }
:where(.col-xs-offset-0) { margin-left: 0; }

/* Equal-height card rows used on the landing page */
.row-eq-height {
    display: flex;
    flex-wrap: wrap;
}

    .row-eq-height > [class*="col-"] {
        display: flex;
    }

        .row-eq-height > [class*="col-"] > .card {
            width: 100%;
        }

/* ===========================================================================
 * 4. Form + control utilities (BS3)
 * ======================================================================== */
.form-group {
    margin-bottom: 1rem;
}

.control-label {
    font-weight: 700;
}

.help-block {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #737373;
}

.input-group-addon {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #555;
    text-align: center;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* BS3 input-group (e.g. Browse + filename). BS5 dropped `.input-group-btn` and the
 * table-cell layout, so legacy file-upload rows stack vertically instead of inline. */
.input-group {
    position: relative;
    display: table;
    border-collapse: separate;
    width: 100%;
}

    .input-group[class*="col-"] {
        float: none;
    }

    .input-group .form-control {
        display: table-cell;
        width: 100%;
        margin-bottom: 0;
        position: relative;
        z-index: 2;
        float: left;
    }

.input-group-addon,
.input-group-btn,
.input-group > label.input-group-btn {
    display: table-cell;
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

.input-group-btn,
.input-group > label.input-group-btn {
    font-size: 0;
    white-space: nowrap;
}

    .input-group-btn > .btn,
    .input-group > label.input-group-btn > .btn {
        position: relative;
    }

    .input-group .form-control:not(:first-child):not(:only-child),
    .input-group-addon:not(:first-child),
    .input-group-btn:not(:first-child) > .btn,
    .input-group > label.input-group-btn:not(:first-child) .btn {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    .input-group .form-control:not(:last-child):not(:only-child),
    .input-group-addon:not(:last-child),
    .input-group-btn:not(:last-child) > .btn,
    .input-group > label.input-group-btn:not(:last-child) .btn {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

.radio, .checkbox {
    position: relative;
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* ===========================================================================
 * 5. Buttons (BS3 names dropped by BS5)
 * ======================================================================== */
.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}

    .btn-default:hover,
    .btn-default:focus,
    .btn-default:active {
        color: #333;
        background-color: #e6e6e6;
        border-color: #adadad;
    }

/* Legacy `.btn-darkblue` — used on modal Cancel/Yes/OK across CP (main.css block
   is commented out). BS5 `.btn` without a variant has no fill/border, so these
   rendered as plain text. Match RC BS3 modal footer buttons (btn-default look). */
.btn-darkblue,
.btn-darkblue:focus,
.btn-darkblue:active,
.btn-darkblue:hover {
        background-color: #f0f0f0;
}

/* ===========================================================================
 * 6. Caret + panels + wells (BS3 components dropped by BS5)
 * ======================================================================== */
.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px dashed;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel-body {
    padding: 15px;
}

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 16px;
    color: inherit;
}

.panel-footer {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

.panel-default {
    border-color: #ddd;
}

    .panel-default > .panel-heading {
        color: #333;
        background-color: #f5f5f5;
        border-color: #ddd;
    }

.panel-group .panel {
    margin-bottom: 0;
    border-radius: 4px;
}

.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}

/* BS3 modal/alert close button ("&times;") — BS5 renamed it to .btn-close. */
button.close {
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
}

.close {
    float: right;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    /* color: #000;
    text-shadow: 0 1px 0 #fff;
    filter: alpha(opacity=20);
    opacity: .2; */
}

    .close:hover,
    .close:focus {
        /* color: #000; */
        text-decoration: none;
        cursor: pointer;
        /* filter: alpha(opacity=50);
        opacity: .5; */
    }

/* ===========================================================================
 * 7. Shell navbar re-skin
 *    The dash theme styles the menu via BS3 `.navbar-inverse ...` selectors.
 *    The CPV2 shell navbar is native BS5 (#navbarContainer, navbar-expand-lg),
 *    so those dash rules no longer matched and the menu fell back to a plain
 *    dark bar. Re-apply the dash menu look, scoped to the shell navbar only.
 * ======================================================================== */
#navbarContainer.navbar {
    --bs-navbar-padding-y: 0;
    --bs-navbar-padding-x: 0;
    --bs-navbar-toggler-font-size: 1rem;
    --bs-navbar-toggler-padding-y: 0.25rem;
    --bs-navbar-toggler-padding-x: 0.5rem;
    min-height: 0;
    padding: 0;
    margin-bottom: 0;
    /*background-color: #00446b;*/
    border: 0 solid #00446b;
    border-radius: 0;
}

#navbarContainer .navbar-nav {
    margin: 0;
}

    #navbarContainer .navbar-nav > li {
        padding: 0;
    }

        #navbarContainer .navbar-nav > li > a {
            display: block;
            padding: 5px 20px;
            color: #fff;
            font-weight: bold;
            text-decoration: none;
        }

            #navbarContainer .navbar-nav > li > a:hover,
            #navbarContainer .navbar-nav > li > a:focus {
                /* color: #fff;
                background-color: #00938d; */
            }

    #navbarContainer .navbar-nav > .active > a,
    #navbarContainer .navbar-nav > li.active > a,
    #navbarContainer .navbar-nav > .open > a,
    #navbarContainer .navbar-nav > .open > a:hover,
    #navbarContainer .navbar-nav > .open > a:focus,
    #navbarContainer .navbar-nav > .show > a {
        color: #fff;
        /*background-color: #0086b8;*/
    }

/* The markup supplies its own carets (<b class="caret"> / fa-caret-*),
   so suppress the BS5 dropdown-toggle ::after caret to avoid doubles. */
#navbarContainer .dropdown-toggle::after {
    display: none;
}

/* Collapse toggler (mobile): right-aligned and compact like the original
   BS3 .navbar-toggle. Tenant border/hover colors come from dash + child.css
   via the extra .navbar-toggle class on the button. */
#navbarContainer .navbar-toggler {
    margin: 6px 0 6px auto;
    padding: 4px 8px;
    line-height: 1;
}

    #navbarContainer .navbar-toggler:focus {
        box-shadow: none;
    }

#navbarContainer .navbar-toggler-icon {
    display: block;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Stack the collapsed menu like the original site (BS5 .navbar-nav is row by default).
   Full-width inner container so the hamburger sits on the right edge of the bar. */
@media (max-width: 991.98px) {
    #navbarContainer #navContainer.container {
        max-width: none;
        width: 100%;
    }

    #navbarContainer .navbar-collapse:not(.show) {
        display: none;
    }

    #navbarContainer .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

        #navbarContainer .navbar-nav > li {
            width: 100%;
        }
}

/* Dropdown panels: keep BS5 dropdowns readable on the dark bar. */
#navbarContainer .dropdown-menu {
    padding: 0;
    border-radius: 0 0 4px 4px;
    font-size: 14px;
}

/* Desktop navbar: hover opens via main.css (.dropdown:hover > .dropdown-menu).
   Click uses BS5, which sets [data-bs-popper] { top: 100%; margin-top: spacer }
   on position:absolute menus. That anchors to the stretched <li> height, not the
   link, so the panel sits lower than on hover. Match hover by using static
   placement for click-open menus. */
@media (min-width: 992px) {
    #navbarContainer.navbar-expand-lg .navbar-nav .dropdown-menu[data-bs-popper] {
        top: auto;
        margin-top: 0;
    }
}

    #navbarContainer .dropdown-menu > li > a,
    #navbarContainer .dropdown-menu .dropdown-item {
        padding: 3px 15px;
        white-space: normal;
        color: #333;
        text-decoration: none;
    }

        #navbarContainer .dropdown-menu > li > a:hover,
        #navbarContainer .dropdown-menu > li > a:focus,
        #navbarContainer .dropdown-menu .dropdown-item:hover,
        #navbarContainer .dropdown-menu .dropdown-item:focus {
            background-color: #ddddde;
            color: #333;
        }

/* ===========================================================================
 * 8. Feature-view BS3 -> BS5 gaps  (added by Upgrade Chunk U1 — UI parity)
 *    docs/0004-upgrade-clientportalv2-ui-parity/upgrade-plan/upgrade-plan.md
 *
 *    These close the specific gaps the BS5 shell exposed on still-BS3 feature
 *    views (charts/tabs, accordion open-state, alignment, select caret, double
 *    carets, feature dropdown menus, searchable .ms-* dropdowns). Everything is
 *    scoped to legacy markup so native BS5 components are not affected.
 * ======================================================================== */

/* 8.1 Text alignment (BS5 renamed .text-left/.text-right -> .text-start/.text-end;
 *     .text-center still exists in BS5 so it is intentionally not redefined). */
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* 8.2 Inline radios / checkboxes (dropped by BS5). BS5 renders the control flush
 *     against its label text and against adjacent groups, so restore the legacy
 *     spacing: a gap after the control, and a gap before each group (which also
 *     separates the first group from a preceding "Sort By:" label). */
.radio-inline,
.checkbox-inline {
    position: relative;
    display: inline-block;
    margin-bottom: 0;
    margin-left: 10px;
    font-weight: 400;
    vertical-align: middle;
    cursor: pointer;
}

    .radio-inline > input[type="radio"],
    .checkbox-inline > input[type="checkbox"] {
        margin-top: 0;
        margin-right: 6px;
    }

/* 8.2b Table header — neutralize BS5 per-cell paint only. BS5 sets white backgrounds on
 *      every `.table` cell via `.table > :not(caption) > * > *` (0,2,2), which beats the
 *      legacy `table > thead > tr > th` rule (0,0,4). Do not set header colors here;
 *      tenant ~/Css/child.css loads last and owns thead background/color. */
.table > :not(caption) > thead > tr > th,
.table > :not(caption) > thead > tr > td {
    --bs-table-bg: transparent;
    --bs-table-color: inherit;
    background-color: transparent;
    color: inherit;
    box-shadow: none;
}

th.seagreen-bg,
td.seagreen-bg {
    background: #00948c !important;
    color: #fff;
}

/* 8.2c Table cell separators + padding. BS5 only sets the border *width* on
 *      `.table` / `.table-bordered` cells (style + color come from CSS variables
 *      the legacy theme overrides away in places), and its per-cell padding gets
 *      lost on the nested Request Details sub-table, so the Manage Members results
 *      table and its sub-table render with no row/column separator lines and
 *      cramped cells. Restore the BS3 values at (0,1,3) so they win over BS5's
 *      `.table > :not(caption) > * > *` (0,1,1). Cell backgrounds are handled in
 *      8.2d below (BS5's per-cell white would otherwise hide the legacy `<tr>`
 *      stripes), and `.pad-0` keeps its !important 0 padding so the sub-table
 *      still sits flush in its cell. */
.table > thead > tr > th,
.table > thead > tr > td,
.table > tbody > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    padding: 8px;
    border-top: 1px solid #ddd;
}

.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
    border: 1px solid #ddd;
}

/* 8.2d Legacy alternating row stripes. The theme bands the rows by setting a
 *      background on each `<tr>` (with !important; #e3e3e3 / #f3f3f3 in main.css),
 *      which showed under BS3 because the cells were transparent. BS5 paints every
 *      cell with `background-color: var(--bs-table-bg)` (white) via
 *      `.table > :not(caption) > * > *`, which sits on top of the `<tr>` and hides
 *      the stripes, so the Manage Members results rows rendered flat white instead
 *      of the banded gray on the live site. Make the body cells transparent for
 *      these legacy striped tables (specificity 0,2,3 beats BS5's 0,1,1) so the
 *      `<tr>` stripe shows through. The Request Details sub-table still reads white
 *      because its own table carries `background:#fff !important`, and the
 *      sea-green accent headers are untouched (they live in `<thead>`). */
.parent-table table.table > tbody > tr > td,
.parent-table table.table > tbody > tr > th,
.nested-table table.table > tbody > tr > td,
.nested-table table.table > tbody > tr > th,
.lgreen-table table.table > tbody > tr > td,
.lgreen-table table.table > tbody > tr > th,
.lyellow-table table.table > tbody > tr > td,
.lyellow-table table.table > tbody > tr > th,
.lblue-table table.table > tbody > tr > td,
.lblue-table table.table > tbody > tr > th {
    background-color: transparent;
}

/* ...but the Request Details sub-table is itself a `table.table` inside
 * `.parent-table`, so the stripe rule lands on ITS rows too; with the cells now
 * transparent (8.2d) that gray would show through and the sub-table would look
 * banded. Re-assert white on the sub-table's own body cells (specificity 0,3,4
 * beats 8.2d's 0,2,4); an opaque cell paints over the striped `<tr>` regardless
 * of the stripe's !important. The sea-green header row is in `<thead>` (and
 * carries !important), so it keeps its accent. */
.parent-table .child-tr table.table > tbody > tr > td,
.parent-table .child-tr table.table > tbody > tr > th,
.nested-table .child-tr table.table > tbody > tr > td,
.nested-table .child-tr table.table > tbody > tr > th,
.lgreen-table .child-tr table.table > tbody > tr > td,
.lgreen-table .child-tr table.table > tbody > tr > th,
.lyellow-table .child-tr table.table > tbody > tr > td,
.lyellow-table .child-tr table.table > tbody > tr > th,
.lblue-table .child-tr table.table > tbody > tr > td,
.lblue-table .child-tr table.table > tbody > tr > th {
    background-color: #fff;
}

/* 8.3 Legacy "open" state for tabs/collapse.
 *     BS3 used `.in`; BS5 uses `.show`. portal-bs3-bridge.js promotes `.in` to
 *     `.show` at load/ajax; these rules are the pre-script (no-flash / no-JS)
 *     fallback so initially-open panes and accordion sections are visible. */
.tab-pane.fade.in { opacity: 1; }
/* Legacy alert empty-state notes use `fade in` (BS3). BS5 `.fade` stays at
 * opacity:0 without `.show`; jQuery `.show()` only toggles display. */
.alert.fade.in { opacity: 1; }
.collapse.in { display: block; }
tr.collapse.in { display: table-row; }
tbody.collapse.in { display: table-row-group; }

/* 8.4 <select class="form-control"> caret.
 *     BS5 draws the dropdown arrow only on `.form-select`; legacy single selects
 *     use `.form-control` and lose it. Re-add the BS5 SVG caret without touching
 *     native `.form-select`, multi-selects, or size-lists. */
select.form-control:not([multiple]):not([size]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* 8.5 Feature dropdowns.
 *     Legacy toggles supply their own caret (<span class="caret">/<b class="caret">),
 *     so suppress BS5's ::after to avoid a double caret (e.g. "Insurewell
 *     Management"); and style BS3 `<li><a>` menu items, which BS5 only styles via
 *     `.dropdown-item`. Scoped with :not(.dropdown-item) to leave native menus be. */
.dropdown-toggle:has(> .caret)::after {
    display: none;
}

.dropdown-menu > li > a:not(.dropdown-item) {
    display: block;
    width: 100%;
    padding: 3px 20px;
    clear: both;
    font-weight: 400;
    line-height: 1.42857143;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
}

    .dropdown-menu > li > a:not(.dropdown-item):hover,
    .dropdown-menu > li > a:not(.dropdown-item):focus {
        color: #262626;
        background-color: #f5f5f5;
    }

/* 8.5b `.orange` utility — RC term-date / alert text color.
 *     BS5 `.table > :not(caption) > * > *` sets cell color and beats plain
 *     `.orange` on `<td>` (e.g. Points Management Term Date column). */
.orange,
.fa-close,
.fa-times,
.fa-minus-circle,
.fa-chevron-circle-up,
.fa-cloud-download {
    color: #e74846;
}

.table > :not(caption) > * > td.orange,
.table > :not(caption) > * > td.orange.TerminationDate {
    color: #e74846;
}

/* 8.6 Searchable dropdown (jQuery multipleSelect, `.ms-*`) under BS5.
 *     The plugin's own multiple-select.css still loads; only realign its control
 *     to BS5 form sizing and keep the drop above BS5 layers. */
.ms-parent {
    width: 100%;
    max-width: 100%;
    position: relative;
}

.ms-choice {
    height: auto;
    min-height: calc(1.5em + 0.75rem + 2px);
    line-height: calc(1.5em + 0.75rem);
    border-color: #ced4da;
}

    .ms-choice > span {
        line-height: inherit;
    }

.ms-drop {
    z-index: 1056;
    width: 100% !important;
    min-width: 100%;
    max-width: 100%;
    left: 0 !important;
    right: auto;
    box-sizing: border-box;
}

.ms-drop ul,
.ms-search {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar .form-controls .ms-parent,
#parameterBar .form-controls .ms-parent {
    width: 100%;
}

/* Reporting — "Choose your parameters": single-line ellipsis, tight padding (beats dash .ms-choice). */
@media (min-width: 576px) {
    .row-eq-height.active-reporting > #parameterBar {
        flex: 0 0 25%;
        width: 25%;
        max-width: 25%;
        min-width: 0;
        overflow-x: clip;
        overflow-y: visible;
    }

    .row-eq-height.active-reporting > #rightpart {
        flex: 0 0 75%;
        width: 75%;
        max-width: 75%;
        min-width: 0;
    }

}

/* No-parameter portals: keep col-sm-3 / col-sm-9 positions; hide gray panel only. */
.row-eq-height.active-reporting.reporting-no-parameter-bar > #parameterBar {
    background-color: transparent !important;
    align-self: flex-start;
}

.row-eq-height.active-reporting.reporting-no-parameter-bar > #parameterBar .sidebar,
.row-eq-height.active-reporting.reporting-no-parameter-bar > #parameterBar [data-testid="cpv2-reporting-parameter-panel"] {
    visibility: hidden;
    height: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: transparent !important;
    border: none;
}

#parameterBar {
    min-width: 0;
    box-sizing: border-box;
}

#parameterBar > .sidebar,
#parameterBar .form,
#parameterBar .form-body,
#parameterBar .form-row,
#parameterBar .form-controls {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#parameterBar .form-controls .ms-parent {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

#parameterBar > .sidebar {
    padding-left: 10px;
    padding-right: 10px;
}

#parameterBar .ms-parent button.ms-choice,
#parameterBar .ms-parent .ms-choice {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    line-height: 22px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 18px 0 6px !important;
    box-sizing: border-box !important;
}

#parameterBar .ms-choice > span {
    position: absolute !important;
    top: 0 !important;
    left: 6px !important;
    right: 14px !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    line-height: 34px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    box-sizing: border-box;
}

#parameterBar .ms-choice > div.icon-caret {
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%);
    margin-top: 0 !important;
}

#parameterBar .form-controls select:not(.ms-offscreen) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#parameterBar .ms-drop {
    z-index: 1060 !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

#parameterBar .ms-drop ul > li label {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100%;
}

/* 8.7 Legacy nav-tabs geometry.
 *     BS5 styles tabs only through .nav-link/.nav-item, so legacy
 *     `ul.nav-tabs > li > a` tab strips (enrollment dashboard, search tabs) lose
 *     BS3's block tab boxes and spacing — the active background hugs the text and
 *     the tabs run together. Restore the BS3 tab geometry. Scoped to .nav-tabs so
 *     the BS5 shell navbar (.navbar-nav) is untouched; per-page dash colors (which
 *     are id-scoped) still win, so this only fixes layout, not theme. */
.nav-tabs {
    border-bottom: 1px solid #ddd;
}

.nav-tabs > li {
    margin-bottom: -1px;
}

    .nav-tabs > li > a {
        display: block;
        margin-right: 2px;
        line-height: 1.42857143;
        border: 1px solid transparent;
        border-radius: 4px 4px 0 0;
    }

    .nav-tabs > li.active > a,
    .nav-tabs > li.active > a:hover,
    .nav-tabs > li.active > a:focus {
        border: 1px solid #ddd;
        border-bottom-color: transparent;
    }

/* 8.8 Legacy modal layout (BS3 markup inside BS5 modal).
 *     Re-order the legacy close to the top-right, restore the RC red circular
 *     close (main.css), and cap legacy heading-tag titles. */
.modal-content {
    overflow: visible;
}

.modal-header {
    position: relative;
    display: block;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header > button.close,
.modal-header > .close {
    position: absolute;
    right: -12px;
    top: -12px;
    z-index: 5;
    float: none;
    margin: 0;
    padding: 0 7px 4px !important;
    border: 0;
    border-radius: 8px;
    color: #fff !important;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    opacity: 1 !important;
    background: #e74846 !important;
    text-shadow: none;
    cursor: pointer;
}

    .modal-header > button.close:hover,
    .modal-header > button.close:focus,
    .modal-header > .close:hover,
    .modal-header > .close:focus {
        color: #fff !important;
        opacity: 1 !important;
        background: #a94442 !important;
        text-decoration: none;
        filter: none;
    }

@media (max-width: 767px) {
    .modal-header > button.close,
    .modal-header > .close {
        right: -7px;
        top: -7px;
    }
}

.modal-header > h1.modal-title,
.modal-header > h2.modal-title,
.modal-header > h3.modal-title,
.modal-header > h4.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

/* 8.8b Legacy modal footer — BS3 spacing, border, and button row under BS5 flex footer */
.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 15px;
    border-top: 1px solid #e5e5e5;
    gap: 10px;
}

    .modal-footer .btn-primary {
        float: none;
        margin-right: 0;
    }

    .modal-footer .btn {
        margin-bottom: 0;
    }

    .modal-footer .btn + .btn {
        margin-left: 0;
    }

    .modal-footer .btn-dashboard,
    .modal-footer .btn-darkblue,
    .modal-footer .btn-default,
    .modal-footer .btn-primary {
        min-width: 90px;
    }

    /* Cancel / dismiss footer buttons — RC gray pill, not plain BS5 text */
    .modal-footer .btn-darkblue,
    .modal-footer .btn-default,
    .modal-footer .btn-dashboard[data-bs-dismiss="modal"],
    .modal-footer .btn-dashboard[data-dismiss="modal"],
    .modal-footer .btn-primary[data-bs-dismiss="modal"]:only-child {
        float: none;
    }

/* 8.9 Legacy `.form-inline` (removed in BS5).
 *     BS3 laid a form's groups, labels and controls out inline on >=sm screens
 *     and shrank `.form-control` to `width:auto`; BS5 dropped the class, so the
 *     groups stack and controls go full width (e.g. the Documents "Effective From
 *     (custom dates)" Start/End fields fell onto separate lines). Restore the
 *     inline layout, mirroring BS3's behaviour at the BS5 sm breakpoint so it
 *     still stacks on phones. */
@media (min-width: 576px) {
    .form-inline .form-group {
        display: inline-block;
        margin-bottom: 0;
        vertical-align: middle;
    }

    .form-inline .form-control {
        display: inline-block;
        width: auto;
        vertical-align: middle;
    }

    .form-inline label {
        display: inline-block;
        margin-bottom: 0;
        vertical-align: middle;
    }
}

/* 8.10 Reporting/dash theme puts `.form-select` on a wrapper <div> (it was
 *      authored for a Select2 widget: `.form-select .select2-container ...`).
 *      The real markup holds a plain native <select>, so under BS3 `.form-select`
 *      matched nothing on its own and you saw a clean native dropdown. BS5 turned
 *      `.form-select` into a real control style, so it paints a caret SVG, border,
 *      radius, padding and background ON the wrapper <div> while the native
 *      <select> inside keeps its own caret -> a doubled/boxed dropdown (Reporting
 *      "Company" and "Portals"). Strip BS5's control painting from wrapper <div>s
 *      only; a native `<select class="form-select">` elsewhere is left untouched.
 *      (`div.form-select` = specificity 0,1,1, so it wins over BS5's `.form-select`
 *      regardless of stylesheet order.) */
div.form-select {
    padding: 0;
    background-image: none;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    line-height: inherit;
    font-size: inherit;
    color: inherit;
}

/*      Width parity: the dash sidebar is designed for full-width controls
 *      (the "Date as of" `.field` is width:100%), but a native <select> only
 *      sizes to its content. Under BS3 the wrapper's width carried the control;
 *      now that the wrapper is neutralized, give the native reporting selects the
 *      width back so "Company" fills the parameter column like V1 and "Portals"
 *      shows its full option instead of collapsing to a caret. */
.sidebar .form-controls .select {
    width: 100%;
}

/* 8.11 Reporting right pane layout parity (V1).
 *      The pane is `<div class="row row-eq-height active-reporting">` with a
 *      col-sm-3 sidebar and a col-sm-9 content column (#rightpart). Section 3's
 *      bridge rule `.row-eq-height > [class*="col-"] { display:flex }` (added for
 *      landing-page equal-height cards) turns #rightpart into a flex ROW, so its
 *      two stacked blocks - the Portals bar and the "Next, choose your type of
 *      report" title + report tiles - rendered SIDE BY SIDE and the Portals
 *      control got squished. Restore block flow on the content column so they
 *      stack vertically: Portals, then title, then tiles. (`#rightpart` id =
 *      specificity 1,0,0, so it beats the section-3 rule regardless of order.) */
#rightpart {
    display: block;
}
@media screen and (min-width: 1400px) {
    #rightpart {
        margin-left: -30px;
    }
}
/*      Portals bar: keep the "Portals" label and its dropdown on one line with a
 *      comfortably wide control. The BS3 `float` layout collapsed under BS5; flex
 *      pins the label and lets the dropdown take the remaining width. */
#availablePortals {
    display: flex;
    align-items: center;
}

    /* The "Portals" <h3> carries a BS3 `float:left` that collapses its wrapper
       inside a flex item; cancel it so the label keeps its width. */
    #availablePortals h3 {
        float: none;
        margin: 0;
    }

    #availablePortals > div:first-child {
        flex: 0 0 auto;
        margin-right: 10px;
    }

    #availablePortals > div.form-select {
        flex: 1 1 auto;
        min-width: 0;
    }

    #availablePortals .select {
        width: 100%;
    }

/* Documents: subtitle and AutoSearch toggle on one line (BS5 .row > * forces width:100%). */
#participation-dashboard[data-testid="cpv2-documents-feature-root"] > .row:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

    #participation-dashboard[data-testid="cpv2-documents-feature-root"] > .row:first-child > .col-xs-12 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    #participation-dashboard[data-testid="cpv2-documents-feature-root"] > .row:first-child > .col-xs-8.h2-sub-heading {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
    }

        #participation-dashboard[data-testid="cpv2-documents-feature-root"] > .row:first-child > .col-xs-8.h2-sub-heading > p {
            margin-bottom: 0;
        }

    #participation-dashboard[data-testid="cpv2-documents-feature-root"] > .row:first-child > .col-xs-4.h2-sub-heading {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }

/* Metro dropdown: global form reset adds margin-bottom on selects; inside the
   bordered wrapper that leaves a gap below the control. #participation-dashboard
   already zeros this in main.css — apply for all metro dropdown hosts. */
:root .css3-metro-dropdown {
    display: block;
}

.css3-metro-dropdown select {
    margin-bottom: 0;
    padding: 0 36px 0 8px;
    line-height: 30px;
    height: 32px;
}

:root .css3-metro-dropdown::after {
    top: 50%;
    height: 28px;
    line-height: 28px;
    margin-top: -14px;
}

/* Billing & Payments: match RC label spacing (not under #participation-dashboard). */
#ebix-billing-payments .enroll-form-group .col-md-6 label {
    margin-bottom: 10px;
}

#ebix-billing-payments .points-section > .row.enroll-form-group.marginTop-0 {
    margin-bottom: 0;
}

/* ===========================================================================
 * 9. Keyboard focus (WCAG 2.1 AA — operable)
 *    Reinforce visible focus on legacy controls; BS5 supplies defaults on
 *    native components but dash/legacy CSS sometimes flattens outlines.
 * ======================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #0a6ebd;
    outline-offset: 2px;
}

/* Publish Documents: BS5 paints per-cell white backgrounds that hide legacy `<tr>`
 * striping on `.table-striped`. Table header colors come from tenant child.css. */
#participation-dashboard .points-section table#tabDocument.table-striped > tbody > tr:not(.parenttr):not(.parenttr2) > td,
#participation-dashboard .points-section table#tabDocument.dataTable.table-striped > tbody > tr:not(.parenttr):not(.parenttr2) > td {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none;
}
table.dataTable>tfoot>tr>th, table.dataTable>tfoot>tr>td {
    border: none;
}
/* Manage Members: nested Request Details grid must span the full member row. */
.parent-table tr.child-tr > td.pad-0 {
    padding: 0 !important;
}

.parent-table tr.child-tr .collapse > table.table {
    width: 100%;
    margin-bottom: 0;
    table-layout: fixed;
}
    .form-label {
        font-weight: 700;
    }

/* BS3 disabled/read-only fields: #eee everywhere under CPV2 (BS5 default is #e9ecef).
   Wins over inline draft highlights (#fff5ca) when a control is disabled. */
.form-control:disabled,
.form-control[disabled],
.form-control[readonly],
textarea.form-control:disabled,
textarea.form-control[disabled],
textarea.form-control[readonly],
fieldset[disabled] .form-control,
select.form-control:disabled,
select.form-control[disabled],
.form-select:disabled,
.form-select[disabled] {
    background-color: #eee !important;
    background: #eee !important;
    opacity: 1;
}

.form-control:disabled,
.form-control[disabled],
fieldset[disabled] .form-control {
    cursor: not-allowed;
}

.form-control:disabled:-webkit-autofill,
.form-control[disabled]:-webkit-autofill,
textarea.form-control:disabled:-webkit-autofill,
textarea.form-control[disabled]:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #eee inset !important;
    box-shadow: 0 0 0 1000px #eee inset !important;
    -webkit-text-fill-color: #555 !important;
}

    .btn-link {
        font-weight: 400;
        color: #337ab7;
        border-radius: 0;
        text-decoration: none;
    }
    .panel-title>.small, .panel-title>.small>a, .panel-title>a, .panel-title>small, .panel-title>small>a {
        color: inherit;
    }

/* Provider Network Search — Client Portal host page only (not iframe / other modules). */
#participation-dashboard.general-provider-search .form-label,
#participation-dashboard.general-provider-search label {
    font-weight: 700;
}

/* Enrollment KO — page intro, group header, username row (RC spacing). */
[data-cpv2-module="enrollment-ko"] .enrollment-page-intro h2 {
    margin: 20px 0 12px;
}

/* Pop Health — Member Contact detail: title/subtitle left, Back button top-right (BS5 row fix). */
#participation-dashboard[data-testid="cpv2-pophealth-member-contact-detail-root"] .member-contact-page-header {
    flex-wrap: nowrap;
    align-items: flex-start;
}

#participation-dashboard[data-testid="cpv2-pophealth-member-contact-detail-root"] .member-contact-page-header > .col-9,
#participation-dashboard[data-testid="cpv2-pophealth-member-contact-detail-root"] .member-contact-page-header > .col-3,
#participation-dashboard[data-testid="cpv2-pophealth-member-contact-detail-root"] .member-contact-page-header > .col-xs-9 {
    flex: 0 0 auto;
}

#participation-dashboard[data-testid="cpv2-pophealth-member-contact-detail-root"] .member-contact-page-header .h2-sub-heading p {
    margin-bottom: 0;
}

#participation-dashboard[data-testid="cpv2-pophealth-member-contact-detail-root"] .member-contact-back-col {
    padding-top: 24px;
}

[data-cpv2-module="enrollment-ko"] .enrollment-page-intro .h2-sub-heading p {
    margin-bottom: 0;
}

[data-cpv2-module="enrollment-ko"] .enrollment-group-header {
    align-items: flex-start;
    flex-wrap: nowrap;
}

[data-cpv2-module="enrollment-ko"] .enrollment-group-header > .col-9,
[data-cpv2-module="enrollment-ko"] .enrollment-group-header > .col-3 {
    flex: 0 0 auto;
}

[data-cpv2-module="enrollment-ko"] .enrollment-group-header .enrollment-subsection-title {
    margin-top: 24px;
    margin-bottom: 8px;
}

[data-cpv2-module="enrollment-ko"] .enrollment-group-header .group-name-heading {
    margin-bottom: 0;
}

[data-cpv2-module="enrollment-ko"] .enrollment-group-header .enrollment-back-col {
    padding-top: 24px;
}

[data-cpv2-module="enrollment-ko"] .enrollment-group-header .enrollment-back-btn {
    margin-top: 0;
}

[data-cpv2-module="enrollment-ko"] form > .panel.panel-default {
    margin-bottom: 2px;
}

[data-cpv2-module="enrollment-ko"] .enrollment-draft-note {
    margin-top: 0;
    margin-bottom: 10px;
}

[data-cpv2-module="enrollment-ko"] .usernameLable {
    margin-left: 0;
    margin-right: 0;
}

[data-cpv2-module="enrollment-ko"] .usernameLable .btnColor {
    margin-top: 0;
    position: static;
}

/* Section 3 Elections — Step 2 options list aligned with section heading (screen + print). */
[data-cpv2-module="enrollment-ko"] #elections-section .elections-step2-options,
[data-cpv2-module="enrollment-ko"] #elections-section .elections-step2-options .form-label {
    padding-left: 0;
    margin-left: 0;
    text-align: left;
}

[data-cpv2-module="enrollment-ko"] #elections-section .elections-step2-options .list-feature {
    padding-left: 0;
    margin-left: 0;
    list-style-position: inside;
    text-align: left;
}

[data-cpv2-module="enrollment-ko"] #elections-section .elections-step2-options .list-feature li {
    padding-left: 0;
    margin-left: 0;
    text-align: left;
}

/* Draft-required demographics — always #fff5ca (RC), even when disabled; beats portal #eee disabled rule. */
[data-cpv2-module="enrollment-ko"] #demographics-section .form-control.enrollment-draft-required,
[data-cpv2-module="enrollment-ko"] #demographics-section .form-control.enrollment-draft-required:disabled,
[data-cpv2-module="enrollment-ko"] #demographics-section .form-control.enrollment-draft-required[disabled] {
    background-color: #fff5ca !important;
    background: #fff5ca !important;
    opacity: 1;
}

[data-cpv2-module="enrollment-ko"] #demographics-section .form-control.enrollment-draft-required:disabled:-webkit-autofill,
[data-cpv2-module="enrollment-ko"] #demographics-section .form-control.enrollment-draft-required[disabled]:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff5ca inset !important;
    box-shadow: 0 0 0 1000px #fff5ca inset !important;
    -webkit-text-fill-color: #333 !important;
}

/* COB documentation upload: Browse + filename on one row (BS3 input-group). */
#pcpSelection-3D .cob-file-upload.input-group {
    display: flex;
    align-items: center;
    max-width: 520px;
}

#pcpSelection-3D .cob-file-upload .btn {
    margin-bottom: 0;
}

#pcpSelection-3D .cob-file-upload > label.input-group-btn {
    font-size: 14px;
    display: flex;
    flex: 0 0 auto;
    width: auto;
    align-items: stretch;
    margin: 0;
}

#pcpSelection-3D .cob-file-upload .input-group > label.input-group-btn > .btn.btn-dashboard {
    height: 34px;
    min-height: 34px;
    padding: 6px 12px;
    line-height: 20px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#pcpSelection-3D .cob-file-upload #fileNames.form-control {
    background-color: #fff;
    cursor: default;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    float: none;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 34px;
    min-height: 34px;
    padding: 6px 12px;
    line-height: 20px;
    box-sizing: border-box;
}

/* Section 5 Summary: attach-documentation label + checkbox on one aligned row. */
[data-cpv2-module="enrollment-ko"] #summary-section .summary-attach-doc-check {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 0.5rem;
    row-gap: 0.25rem;
}

[data-cpv2-module="enrollment-ko"] #summary-section .summary-attach-doc-check .form-label {
    display: inline;
    margin-bottom: 0;
    padding-bottom: 0;
    line-height: 1.428571429;
}

[data-cpv2-module="enrollment-ko"] #summary-section .summary-attach-doc-check input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    vertical-align: middle;
}

/* bootstrap-slider (Enrollment History): uses BS3 .tooltip.in; BS5 only shows .tooltip.show (opacity 0 otherwise). */
.slider .tooltip {
    position: absolute;
    z-index: 1070;
    display: block;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0;
}

.slider .tooltip.in,
.slider .tooltip.show {
    opacity: 0.9;
}

.slider .tooltip .tooltip-inner {
    color: #fff;
    text-align: center;
    background-color: #000;
    border-radius: 4px;
    padding: 3px 8px;
}

.slider .tooltip .tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
}

.slider .tooltip.top {
    padding: 5px 0;
}

.slider .tooltip.top .tooltip-arrow {
    bottom: 0;
    left: 50%;
    margin-left: -5px;
    border-width: 5px 5px 0;
    border-top-color: #000;
}

.slider .tooltip.bottom .tooltip-arrow {
    top: 0;
    left: 50%;
    margin-left: -5px;
    border-width: 0 5px 5px;
    border-bottom-color: #000;
}

/* FeaturesHost iframe shells (Multiple ID Cards, Member Documents, …): #mainContent
 * is already .container — a nested .container + .row gutters caused a host-page
 * horizontal scrollbar under BS5. Keep iframe width inside the content column. */
#mainContent.container #participation-dashboard:not(.container) {
    max-width: 100%;
    overflow-x: clip;
}

#mainContent.container #participation-dashboard .cpv2-feature-iframe-row > .cpv2-feature-iframe-col {
    min-width: 0;
    max-width: 100%;
}

[data-testid="cpv2-general-iframe-host"],
iframe#featureContainer[name="featureContainer"] {
    display: block;
    max-width: 100%;
    box-sizing: border-box;
}