﻿html {
    font-size: 16px;
}

@media (min-width: 768px) {
    .d-md-table-header-group {
        display: table-header-group !important;
    }
}

.division-row.qli-row-hidden {
    display: none !important;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.px-layout {
    padding-left: 2rem;
    padding-right: 2rem;
}

main.flex-shrink-0 {
    min-height: calc(100vh - 136px);
}

.footer,
.footer-simple {
    border-top: 1px solid var(--Neutral-25, #eaecf0);
    color: var(--Neutral-60, #667085);
}

.shell-user-meta {
    min-height: 2.75rem;
}

.shell-user-firm {
    font-size: 0.9rem;
    color: var(--Neutral-60, #667085);
    white-space: nowrap;
}

.btn-icon {
    border: 0;
    background: transparent;
    border-radius: 8px;
}

.btn-icon:hover,
.btn-icon:focus {
    background-color: var(--Neutral-15, #f2f4f7);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    /* Let the search compress so the nav keeps its room, same as legacy. Without this the
       form sits at min-width:auto and squeezes the nav items into the search box. */
    min-width: 0;
}

#navbarSettings {
    min-width: 0;
}

.top-search--mobile .top-search {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.top-search--mobile .top-search .top-search__seg {
    width: 100%;
}

.top-search--mobile .top-search label.top-search__seg-btn {
    flex: 1 1 0;
    justify-content: center;
}

.top-search--mobile .top-search .top-search__input {
    width: 100%;
}

.top-search__seg {
    display: flex;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    overflow: hidden;
    height: 36px;
    /* Never shrink: the seg clips its overflow, so shrinking would cut off "Keyword".
       Only the text input absorbs the compression. */
    flex: 0 0 auto;
}

.top-search label.top-search__seg-btn {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    color: #344054;
    border-right: 1px solid #d0d5dd;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
}

.top-search label.top-search__seg-btn:last-child {
    border-right: 0;
}

.btn-check:checked + label.top-search__seg-btn {
    background: #2f5d8a;
    color: #fff;
}

.top-search label.top-search__seg-btn.is-disabled {
    background: #f2f4f7;
    color: #98a2b3;
    cursor: not-allowed;
}

.top-search input.top-search__input {
    height: 36px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: 0 12px;
    width: clamp(160px, 18vw, 340px);
    font-size: 14px;
    min-width: 0;
    flex: 1 1 auto;
    background: #fff;
    color: #101828;
}

.top-search__input::placeholder {
    color: #98a2b3;
}

#navbarContent {
    flex: 1 1 auto;
    min-width: 0;
}

/* No overflow here: any non-visible overflow value clips the "More" dropdown, which is a
   child of this list. The overflow items collapse into that dropdown instead of scrolling. */
.bt-main-nav__items {
    /* Same as legacy: the row never wraps. Items shrink and their labels wrap instead, which
       is what keeps the long "Legislative Concept ..." items from running over the search box. */
    flex-wrap: nowrap;
    min-width: 0;
    align-items: center;
}

/* Legacy sets this on the items themselves. Without it flex items refuse to shrink below their
   content width, and a nowrap row would overrun the search box instead of wrapping the labels. */
.bt-main-nav__item {
    min-width: 0;
}

.bt-main-nav__item--orlc {
    max-width: 8.5rem;
}

/* Nav labels wrap onto several lines when space gets tight, same as legacy. Forcing
   nowrap here made the long "Legislative Concept ..." items overrun the search box. */
.bt-main-nav__items .nav-link {
    white-space: normal;
}

.nav-item--more {
    display: none;
}

.nav-item--more .dropdown-toggle::after {
    display: none;
}

.nav-item--more .nav-link {
    padding-left: 12px;
    padding-right: 12px;
    font-size: 20px;
    line-height: 1;
}

.nav-item--more .dropdown-menu {
    min-width: 200px;
    padding: 8px;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid #eaecf0;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
    z-index: 1100;
}

.nav-item--more .dropdown-item {
    padding: 8px 10px;
    border-radius: 10px;
}

.nav-item--more .dropdown-item:hover,
.nav-item--more .dropdown-item:focus {
    background: #f2f4f7;
}

.mobile-nav-shell {
    position: relative;
    z-index: 50;
}

.mobile-nav-shell .navbar-collapse {
    padding-bottom: 1rem;
}

.mobile-nav-shell .navbar-collapse.show {
    position: relative;
    z-index: 50;
    background: #fff;
}

/* No z-index here: it would make <main> a stacking context, trapping every modal rendered
   inside it below the backdrop, which then swallows the clicks. position alone is safe. */
main.flex-shrink-0 {
    position: relative;
}

.shell-home__hero,
.shell-home__card,
.shell-home__status {
    border-color: var(--Neutral-25, #eaecf0) !important;
}

.shell-home__hero {
    background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
}

.shell-home__eyebrow {
    color: var(--primary-55-links, #f78f2b);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.shell-home__status {
    background: var(--Neutral-10, #f8fafc);
}

.shell-home__card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

@media (max-width: 1399.98px) {
    .px-layout {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .top-search {
        width: 100%;
    }

    .top-search input.top-search__input {
        width: 100%;
    }
}

/* Same breakpoint as legacy: the secondary nav items only collapse into the "More"
   dropdown below 1400px. Above that they all stay visible, wrapping if needed. */
@media (max-width: 1399.98px) {
    .bt-main-nav__overflow-item {
        display: none !important;
    }

    .nav-item--more {
        display: block;
    }
}

.shell-user-menu {
    min-width: 240px;
}

.shell-user-menu__header {
    line-height: 1.35;
}

.shell-user-menu .dropdown-item i {
    width: 1rem;
    text-align: center;
    color: var(--Neutral-60, #667085);
}

.timeout-dialog {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.timeout-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.45);
}

.timeout-dialog__panel {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 18vh auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(16, 24, 40, 0.18);
    padding: 24px;
}

#manageFirmTabContent .tab-section-header-wrapper {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

#manageFirmTabContent .tab-section-header-wrapper .tab-section-header {
    display: flex;
    width: auto;
    margin-bottom: 0;
}

#manageFirmTabContent .tab-section-header-actions {
    margin-left: auto;
}

#manageFirmTabContent .tab-section-header-actions .btn-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

#manageFirmTabContent .tab-section-header-actions .btn-group > .btn,
#manageFirmTabContent .tab-section-header-actions .btn-group > a.btn {
    width: auto;
    flex: 0 0 auto;
}

.app-loading-overlay { position: fixed; inset: 0; background: rgba(243,244,246,0.55); z-index: 1000; cursor: wait; }
.app-loading-overlay.d-none { display: none !important; }

/* Flex centring lines up the boxes, not the glyphs: the label's box includes descender space, so
   its visible letters sit above the icon's centre. A 1px lift on the icon matches them optically. */
.icon-link > .bi {
    position: relative;
    top: -1px;
}

/* Select2 keeps its own 26px controls with a 4px radius, which sits next to 38px native selects
   and never lines up. These bring both Select2 shapes onto the same box as the rest of the form
   controls, so a row of mixed inputs aligns. */
/* Prefixed with body on purpose: select2styles.css is linked per page inside the Styles section,
   so it renders after this file and would win on equal specificity. */
body .select2-container .select2-choice,
body .select2-container .select2-choices {
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #101828;
}

body .select2-container .select2-choice {
    height: 38px;
    line-height: 36px;
    padding-left: 12px;
}

body .select2-container .select2-choices {
    min-height: 38px;
    padding: 3px 8px;
}

body .select2-container.select2-container-active .select2-choice,
body .select2-container.select2-container-active .select2-choices {
    border-color: #98a2b3;
    box-shadow: 0 0 0 3px rgba(208, 213, 221, 0.35);
}

body .select2-drop {
    border-color: #d0d5dd;
    font-size: 14px;
}

/* Action buttons in a tab header are flex items and were being squeezed until their label wrapped
   onto a second line, which reads as a button with too much padding rather than a wrapped one. */
.tab-section-header-wrapper .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.dt-container .dt-layout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: .5rem;
}

.dt-container .dt-layout-cell.dt-layout-end {
    margin-left: auto;
}

.dt-container .dt-search,
.dt-container .dt-length {
    display: inline-flex;
    align-items: center;
}

.dt-container .dt-search label,
.dt-container .dt-length label {
    margin: 0;
    white-space: nowrap;
}

.dt-container .dt-search .dt-input {
    min-height: calc(1.5em + .5rem + 2px);
    padding: .25rem .5rem;
    font-size: .875rem;
    line-height: 1.5;
    color: #121212;
    background-color: #fff;
    border: 1px solid #DDD5CF;
    border-radius: 8px;
}

.dt-container .dt-length .dt-input {
    appearance: none;
    padding: .375rem 2.25rem .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #121212;
    background-color: #fff;
    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 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.dt-container .dt-input:focus {
    border-color: #fbc795;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(247, 143, 43, .25);
}

.dt-container .dt-paging nav {
    display: flex;
    flex-wrap: wrap;
    margin: 2px 0;
}

.dt-container .dt-paging-button,
.dt-container .dt-paging .ellipsis {
    position: relative;
    display: block;
    padding: .375rem .75rem;
    margin-left: -1px;
    font-size: 1rem;
    line-height: 1.5;
    color: #363636;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0;
}

.dt-container .dt-paging nav > :first-child {
    margin-left: 0;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.dt-container .dt-paging nav > :last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.dt-container .dt-paging-button:hover {
    z-index: 2;
    color: #363636;
    background-color: #FCF9F6;
}

.dt-container .dt-paging-button.current {
    z-index: 3;
    color: #363636;
    background-color: #FCF9F6;
    border-color: #F78F2B;
}

.dt-container .dt-paging-button.disabled,
.dt-container .dt-paging .ellipsis {
    color: rgba(18, 18, 18, .75);
    background-color: #e9ecef;
    pointer-events: none;
}

@media screen and (max-width: 767px) {
    .dt-container .dt-layout-cell {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: .5rem;
    }

    .dt-container .dt-layout-cell.dt-layout-end {
        margin-left: 0;
    }

    .dt-container .dt-search,
    .dt-container .dt-length {
        display: block;
    }

    .dt-container .dt-paging nav {
        justify-content: center;
    }
}

/* Five columns do not need the full page width; the table stretched to 100% because every
   column carries a percentage. Same intent as the legacy, which caps this area too. */
.division-table {
    max-width: 1100px;
}

/* The desktop row sits under a column header that already names this field; the label is only
   needed by the mobile card, which renders the same partial. */
.division-row.d-md-table-row .division-tags-section .form-label {
    display: none;
}

.division-remove-btn {
    color: #667085;
    background: none;
    line-height: 1;
}

.division-remove-btn:hover {
    color: #b42318;
}

/* Finalize validation. Bootstrap's is-invalid only styles .form-control, so the Select2
   container needs its own rule to pick up the red border. */
.select2-container.is-invalid .select2-choices,
.select2-container.is-invalid .select2-choice {
    border-color: #dc3545;
}

.qli-finalize-error {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    max-width: 500px;
}


.bt-filter > .f-row.header,
.bt-filter > .f-row.controls,
.bt-filter > .bt-filter-display {
    position: sticky;
    z-index: 3;
}

.bt-filter > .f-row.header {
    top: 0;
    background-color: var(--Base-White, #fff);
}

.bt-filter > .f-row.controls {
    top: 46px;
}

.bt-filter > .bt-filter-display {
    top: 106px;
    background-color: var(--Base-White, #fff);
    border-bottom: 1px solid var(--Neutral-20);
}

@media (max-width: 991.98px) {
    #filters-container {
        z-index: 1030;
    }
}

@media (min-width: 1600px) {
    .d-flex.flex-row:has(> #filters-container) > #filters-container.is-open {
        position: sticky;
        top: 85px;
        right: auto;
        align-self: flex-start;
        flex: 0 0 auto;
        max-height: calc(100vh - 101px);
        margin-left: 1rem;
    }

    .d-flex.flex-row:has(> #filters-container) > :not(#filters-container) {
        min-width: 0;
    }
}

.bt-deeplink-highlight {
    box-shadow: 0 0 0 3px rgba(247, 143, 43, .45);
    border-radius: 8px;
    transition: box-shadow .6s ease;
}
