/*
 * The LTC Connection "State LTC Requirements" page (protected/views/state/ltc_requirements.php):
 * every state's training rules on one page (LtcRequirementData). A table, one row per state with
 * resident and non-resident producers' initial certification and renewal (hours, whose course
 * counts, any supplement; below 768px each state is a block with its four figures labelled), then
 * every state's full rules, a section each.
 * Loaded through $this->headers inside the theme's column1 layout (the Bootstrap 3 compatibility
 * stack: 10px root, so sizes are px on purpose). Colours come from the theme: the LTC Connection
 * theme's tokens, and Bootstrap 5's border and secondary text colours,
 * which the LTC Connection and InsuranceStudy themes set to their own (fallbacks for any other theme).
 */
/* when the rules on the page last changed, under the page title */
.ltc-updated {
    margin: -2px 0 14px;
    color: var(--bs-secondary-color, #5d646b);
    font-size: 14px;
}
/* how the page is compiled and the carrier caveat, under the table (the table's own bottom margin
   is given up so the note reads as its footnote) */
.ltc-disclaimer {
    max-width: 90ch;
    margin: -16px 0 36px;
    color: var(--bs-secondary-color, #5d646b);
    font-size: 14px;
    line-height: 1.6;
}
/* The heading and the sentence over the table: what its "whose course counts" lines mean. */
.ltc-key {
    margin: 0 0 28px;
}
.ltc-key-title {
    font-size: 22px;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}
.ltc-key p {
    max-width: 90ch;
    margin: 0;
}
/* the summary's second paragraph */
.ltc-key p + p {
    margin-top: 12px;
}
/* The ways to the sections under the table: the "What if I sell in multiple states?" button under
   the intro paragraph (.ltc-key .ltc-jump), and the state picker above the table (.ltc-state-jump).
   A theme that never styled Bootstrap 5's outline button would show its stock blue, so the buttons'
   colours are named here: the LTC Connection blue, a neutral slate elsewhere. */
/* the sentence that leads into the two buttons, on its own line above them; since 2026-11-17 it also
   says what "NAIC reciprocal" means, so it keeps the summary's measure rather than leaving a last
   word alone on a second line at the page's full width */
.ltc-jump-lead {
    max-width: 90ch;
    margin: 0 0 10px;
}
.ltc-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin: 0 0 16px;
}
/* under the intro paragraph (.ltc-key p would zero its margins) */
.ltc-key .ltc-jump {
    margin: 16px 0 0;
}
/* "For more detail, view a state's full requirements:" (Jason 2026-11-16, in place of a "Read the full
   requirements for every state" button): the label, the state select and Go on one line, the
   label on its own line where they do not fit. Go wears the jump button's outline. */
.ltc-state-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 0 0 26px;
    /* "Back to state table" lands here: clear of the sticky header, with the sentence that leads
       into the picker still in view above it */
    scroll-margin-top: calc(var(--theme-header-offset, 0px) + 56px);
}
/* the label reads on from the sentence above it, so it is set like that sentence: the body's size,
   weight and ink (Jason 2026-11-16: a smaller grey label looked like a different kind of text) */
.ltc-state-jump .form-label {
    float: none;   /* a legacy stylesheet floats bare labels at desktop widths */
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}
.ltc-state-jump .form-select {
    width: auto;
    min-width: 220px;
    font-size: 15px;
}
.ltc-jump .btn,
.ltc-state-jump .btn {
    --bs-btn-color: var(--ltc-blue-700, #3d4852);
    --bs-btn-border-color: var(--ltc-blue, #3d4852);
    --bs-btn-hover-bg: var(--ltc-blue, #3d4852);
    --bs-btn-hover-border-color: var(--ltc-blue, #3d4852);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--ltc-blue-700, #2b333b);
    --bs-btn-active-border-color: var(--ltc-blue-700, #2b333b);
    --bs-btn-active-color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.ltc-jump .btn i {
    margin-left: 6px;
    font-size: 13px;
}
.ltc-index {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 36px;
    font-size: 15px;
    line-height: 1.4;
}
/* background: the legacy reset (css/reset.css) paints every caption grey */
.ltc-index caption {
    caption-side: top;
    text-align: left;
    padding: 0 0 12px;
    background: none;
    color: var(--bs-secondary-color, #5d646b);
    font-size: 14px;
}
.ltc-index th,
.ltc-index td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--bs-border-color, #e2e6e9);
}
/* The header: the theme's palest blue in place of the grey css/newmain.css paints every thead
   cell (a neutral tint on any other theme). The two producer groups are named in the first row,
   each over a hairline that spans its own two columns and stops short of the next group; the
   column names sit under them in the quieter secondary colour; one darker line closes it. */
.ltc-index thead th {
    background: var(--ltc-blue-50, #f1f3f5);
    border-bottom: 0;
    vertical-align: bottom;
}
.ltc-index thead tr:first-child th {
    box-sizing: border-box;
    height: 44px;
    padding-top: 12px;
    padding-bottom: 8px;
    color: var(--ltc-navy, inherit);
    font-size: 15px;
    font-weight: 700;
}
.ltc-index thead tr:first-child th[colspan] {
    background-image: linear-gradient(var(--ltc-ink-300, #cbd0d5), var(--ltc-ink-300, #cbd0d5));
    background-repeat: no-repeat;
    background-position: 12px 100%;
    background-size: calc(100% - 36px) 1px;
}
.ltc-index thead tr:last-child th {
    padding-top: 8px;
    padding-bottom: 10px;
    color: var(--bs-secondary-color, #5d646b);
    font-size: 13px;
    font-weight: 600;
}
.ltc-index thead tr:last-child th,
.ltc-index thead th[rowspan] {
    border-bottom: 1px solid var(--ltc-ink-300, #cbd0d5);
}
/* From 768px, where the table is a table, the header stays in view under the site's sticky header
   (--theme-header-offset, its height; 0 on a theme whose header scrolls away), so a reader far down
   the list still sees what each column is. Each header cell sticks by itself (a sticky thead is
   not dependable in every browser): the first row at the offset, the second under the first row's
   fixed 44px. The table's borders are separate, not collapsed, or the lines would stay behind. */
@media (min-width: 768px) {
    .ltc-index {
        border-collapse: separate;
        border-spacing: 0;
        /* the columns take the widths the <col>s give them, not their longest words (Jason 2026-11-17):
           the states' column as wide as its longest name ("North Carolina" in bold), and the four answer
           columns, given no width, share the rest equally, so the boxes of a row wrap alike (the
           non-resident initial column's hairline and extra 6px leave its words 7px less room) */
        table-layout: fixed;
    }
    .ltc-index col.ltc-index-col-state {
        width: 144px;
    }
    .ltc-index thead th {
        position: sticky;
        top: var(--theme-header-offset, 0px);
        z-index: 2;
    }
    .ltc-index thead tr:last-child th {
        top: calc(var(--theme-header-offset, 0px) + 44px);
    }
}
/* a moderate floor, so a row of four "No training requirement" is not half the height of its neighbours
   (a table cell's height is its minimum) */
.ltc-index tbody th,
.ltc-index tbody td {
    height: 68px;
    /* a firmer line and more air between states than the header's hairlines (Jason 2026-11-16):
       the tinted badges inside a row outweighed the faint line between rows, and a tall row
       (Massachusetts, with its supplement) ran into its neighbours */
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--ltc-ink-300, #cbd0d5);
}
/* "What if I sell in multiple states?", between the table and the full rules: three
   steps, with the table's badges inline in the text so each answer is named in its own colour. */
.ltc-multi {
    max-width: 80ch;
    margin: 8px 0 44px;
    scroll-margin-top: calc(var(--theme-header-offset, 0px) + 16px);
}
.ltc-multi .ltc-full-title {
    margin-bottom: 10px;
}
.ltc-multi p {
    margin: 0;
    line-height: 1.7;
}
.ltc-multi-steps {
    margin: 14px 0 16px;
    padding-left: 22px;
}
.ltc-multi-steps li {
    padding-left: 4px;
    line-height: 1.7;
}
.ltc-multi-steps li + li {
    margin-top: 10px;
}
.ltc-index-accepts.ltc-badge-inline,
.ltc-index-supplement.ltc-badge-inline {
    display: inline;
    margin: 0;
    padding: 2px 6px;
    white-space: nowrap;
}
/* "Full requirements by state", under the table: a section per state, its name and the link to
   its courses over the rules. A section a link named (#texas) stops clear of the sticky header. */
.ltc-full-title {
    margin: 0 0 4px;
    font-size: 26px;
    letter-spacing: -0.02em;
    scroll-margin-top: calc(var(--theme-header-offset, 0px) + 16px);
}
.ltc-full-state {
    padding: 22px 0 24px;
    border-bottom: 1px solid var(--bs-border-color, #e2e6e9);
    scroll-margin-top: var(--theme-header-offset, 0px);
}
/* the state picker focuses the chosen state's heading (tabindex -1) for keyboard and screen
   reader users; the section's :target tint already shows where they are, so no ring on a heading */
.ltc-full-name:focus {
    outline: none;
}
.ltc-full-state:target {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    background-color: var(--ltc-green-50, #f1f5ef);
}
.ltc-full-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 20px;
    margin: 0 0 12px;
}
.ltc-full-name {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.01em;
}
/* "View <State> courses": a text link beside the state's name (Jason 2026-11-16: fifty primary
   buttons down the page were distracting) */
.ltc-full-courses {
    font-size: 15px;
    font-weight: 600;
}
/* Where the state's rules are written and the day they last changed, under its rules: reference
   lines in the note's quiet size and colour, the sources first. */
.ltc-full-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    margin: 16px 0 0;
    color: var(--bs-secondary-color, #5d646b);
    font-size: 14px;
    line-height: 1.5;
}
.ltc-full-foot p {
    margin: 0;
}
.ltc-full-sources {
    max-width: 72ch;
}
.ltc-full-sources a {
    overflow-wrap: anywhere;
}
/* A state's full rules: resident producers beside non-resident producers from 768px, each stage
   under the question it answers (the catalog card's text, LtcRequirementData::faqs()). */
.ltc-full {
    display: grid;
    gap: 18px 40px;
}
/* The producer group (h4) and each question (h5) are headings for the page's outline, set as the
   text they were before: the body face and tracking, not the theme's display headings, and under
   .ltc-full so the theme's own heading margins (.maincontent h4) do not win. */
.ltc-full .ltc-full-who,
.ltc-full .ltc-full-question {
    font-family: inherit;
    letter-spacing: normal;
}
.ltc-full .ltc-full-who {
    margin: 0 0 8px;
    color: var(--ltc-navy, inherit);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;
}
.ltc-full .ltc-full-question {
    max-width: 72ch;
    margin: 12px 0 4px;
    color: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}
.ltc-full .ltc-full-who + .ltc-full-question {
    margin-top: 0;
}
.ltc-full-summary {
    max-width: 72ch;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}
.ltc-full-note {
    max-width: 72ch;
    margin: 6px 0 0;
    color: var(--bs-secondary-color, #5d646b);
    font-size: 14px;
    line-height: 1.5;
}
@media (min-width: 768px) {
    .ltc-full {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.ltc-index tbody th {
    font-weight: 700;
    white-space: nowrap;
}
/* "View courses" under the state's name, the row's one link (the name itself is plain text) */
.ltc-index-courses {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
}
/* whose course satisfies the figure, in the body ink (the answer a multi-state producer reads the
   list for) */
/* Every answer a cell gives is a tinted badge, so the table is scanned by colour (Jason
   2026-11-16), one colour per answer and ink words throughout (coloured words read as links
   beside the state names):
     green        another state's NAIC course counts (any state's, or the producer's home state's)
     gold         the supplement that course needs
     apricot      only the state's own course counts (Jason 2026-11-16: not blue, which read as
                  a link beside the state names, and not red)
     lavender     the carrier decides; also Delaware's non-resident "No Delaware course required, but
                  you still need carrier training..." (LtcRequirementData noHoursTone 'carrier')
     grey         no hours set: "No training requirement", "Partnership policies only"
   The hours follow in the quiet line under the badges. The state catalog's requirement card wears
   the same colours (css/catalog.css .ltc-badge--*): change both files together. */
.ltc-index-accepts,
.ltc-index-supplement,
.ltc-index-none {
    /* the full width of its cell, every box in a column the same width (Jason 2026-11-17) */
    display: block;
    /* the catalog card's box (css/catalog.css .ltc-badge, Jason 2026-11-16), pulled left by its
       padding so the words line up with the hours under it */
    margin: 0 0 6px -10px;
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--ltc-ink, #2b2f33);
    font-size: 14px;
    font-weight: 500;
}
.ltc-index-accepts--any,
.ltc-index-accepts--home {
    background-color: rgba(89, 125, 79, 0.2);
}
.ltc-index-accepts--state {
    background-color: rgba(230, 115, 45, 0.18);
}
.ltc-index-accepts--carrier {
    background-color: rgba(122, 96, 160, 0.17);
}
.ltc-index-supplement {
    background-color: rgba(219, 158, 51, 0.2);
}
.ltc-index-none {
    background-color: rgba(93, 100, 107, 0.12);
    color: var(--bs-secondary-color, #5d646b);
}
/* A hairline down the table between resident and non-resident producers (Jason 2026-11-16, in
   place of a tint on the non-resident columns), from the group headings to the last state, with a
   little more room on its right. Below 768px the table is stacked and has no columns to divide. */
@media (min-width: 768px) {
    .ltc-index .ltc-index-split {
        border-left: 1px solid var(--ltc-ink-300, #cbd0d5);
        padding-left: 18px;
    }
    .ltc-index thead tr:first-child th.ltc-index-split {
        background-position: 18px 100%;
        background-size: calc(100% - 42px) 1px;
    }
}
/* the hours and their term under the badges: the hours in ink (the figure a reader looks for:
   "how many hours?"), the term after them in the quiet colour */
.ltc-index-term {
    margin-top: 2px;
    display: block;
    color: var(--bs-secondary-color, #5d646b);
    font-size: 14px;
}
.ltc-index-hours {
    color: var(--ltc-ink, #2b2f33);
    font-weight: 600;
}
/* the hours of a cell that does not say whose course counts lead it, in ink */
.ltc-index-lead {
    color: var(--ltc-ink, #2b2f33);
    font-size: 15px;
    font-weight: 700;
}
@media (max-width: 767.98px) {
    /* stacked, the table has no columns to size */
    .ltc-index colgroup {
        display: none;
    }
    .ltc-index thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
    /* the caption too: left as a table caption beside block rows it shrinks to its narrowest width */
    .ltc-index,
    .ltc-index caption,
    .ltc-index tbody,
    .ltc-index tr,
    .ltc-index th,
    .ltc-index td {
        display: block;
    }
    .ltc-index tbody tr {
        padding: 14px 0;
        border-bottom: 2px solid var(--ltc-ink-300, #cbd0d5);
    }
    .ltc-index tbody th,
    .ltc-index tbody td {
        height: auto;
        padding: 0;
        border-bottom: 0;
    }
    .ltc-index tbody th {
        font-size: 18px;
        margin-bottom: 8px;
        white-space: normal;
    }
    .ltc-index tbody td {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 16px;
        padding: 4px 0;
    }
    .ltc-index td::before {
        content: attr(data-label);
        /* beside every line of its figure: the hours, whose course counts, a supplement, the term */
        grid-row: 1 / span 4;
        color: var(--bs-secondary-color, #5d646b);
        font-size: 14px;
    }
    .ltc-index td > * {
        grid-column: 2;
    }
    /* The state picker first, above the summary (Jason 2026-11-16): on a phone it is the main way
       to a state's rules, and under the summary it started below the first screen. Only its place
       on the screen moves; the summary, its button and the table's lead follow in their order. */
    .ltc-intro {
        display: flex;
        flex-direction: column;
    }
    .ltc-intro .ltc-state-jump {
        order: -1;
        /* nothing of its own sits above it here, so "Back to state table" lands it just under the header */
        scroll-margin-top: calc(var(--theme-header-offset, 0px) + 16px);
    }
    /* A state that asks the same of resident and non-resident producers (the row's
       .ltc-index-same, LtcRequirementData::sameForAllProducers()): its two figures once, labelled
       "All producers", in place of the same pair twice. Thirty-odd states, so the list is about a
       third shorter to scroll. */
    .ltc-index-same .ltc-index-nonresident {
        display: none;
    }
    .ltc-index-same td::before {
        content: attr(data-label-all);
    }
    /* "View courses" is a finger-sized target (44px), the row's own padding given up to it */
    .ltc-index tbody tr {
        padding-top: 4px;
    }
    .ltc-index tbody th {
        margin-bottom: 0;
    }
    .ltc-index tbody th a {
        display: inline-block;
        padding: 10px 0;
    }
    /* the state's name on the left, "View courses" on its line at the right: no taller a row */
    .ltc-index tbody th {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
    .ltc-index tbody th .ltc-index-courses {
        margin-top: 0;
        padding: 12px 0;
        font-size: 14px;
    }
    .ltc-full-head {
        margin-bottom: 4px;
    }
    .ltc-full-courses {
        display: inline-block;
        padding: 10px 0;
    }
}
/* "Back to state table": a pill at the foot of the page. With the script it floats at the bottom
   left of the screen (the chat button has the bottom right) and shows once the table has scrolled
   out of view. Only opacity and transform move. */
.ltc-back {
    margin: 28px 0 0;
}
.ltc-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    background-color: var(--ltc-navy, #2b333b);
    box-shadow: 0 1px 2px rgba(1, 42, 94, 0.12), 0 8px 24px rgba(1, 42, 94, 0.22);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: transform 0.2s var(--ltc-spring, cubic-bezier(0.2, 0.8, 0.2, 1));
}
.ltc-back-link i {
    font-size: 12px;
}
.ltc-back-link:hover,
.ltc-back-link:focus {
    background-color: var(--ltc-blue-700, #3d4852);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}
.ltc-back-link:focus-visible {
    outline: none;
    box-shadow: var(--ltc-focus, 0 0 0 3px rgba(43, 51, 59, 0.45));
}
.ltc-back-link:active {
    transform: translateY(0) scale(0.98);
}
.ltc-back--floating {
    position: fixed;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease-out, transform 0.3s var(--ltc-spring, cubic-bezier(0.2, 0.8, 0.2, 1));
}
.ltc-back--floating.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .ltc-back--floating,
    .ltc-back-link {
        transition: none;
    }
}
