/*
 * InsuranceStudy's CE requirements and FAQ page (themes/insurancestudy/views/license/details.php),
 * on the design-system layout: the cream page and the tokens of theme.css. It reads as the catalog
 * does: a white page-head band, then white cards; the requirement figures large and green as on
 * the catalog's requirement card, the questions plain headings with hairlines between them (no
 * coloured bars, pills or accent edges). Sizes are px on purpose.
 */

/* 1. Page head (the band itself is theme.css .is-page-head) ------------------------------------ */
.lic-head-action {
    margin: 22px 0 0;
}

/* 2. Layout: the rules and questions, then the look-ups and contacts beside them from 992px ------ */
.lic-layout {
    display: grid;
    gap: 24px;
    margin-top: 28px;
}
.lic-main,
.lic-side {
    display: grid;
    gap: 24px;
    align-content: start;
    min-width: 0;
}
@media (min-width: 992px) {
    .lic-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 32px;
        align-items: start;
    }
    /* nothing to put beside the questions (the LTC pages): one column at the text's width */
    .lic-layout--single {
        grid-template-columns: minmax(0, 1fr);
        max-width: 860px;
    }
}

/* 3. Cards, questions and answers ------------------------------------------------------- */
.lic-card {
    background: #fff;
    border: 1px solid var(--is-border);
    border-radius: 6px;
    box-shadow: var(--is-shadow-xs);
    padding: 24px;
}
.lic-card-title {
    font-size: 22px;
    margin: 0 0 18px;
}
.lic-q {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: var(--is-heading);
    margin: 0 0 8px;
}
.lic-qa + .lic-qa {
    border-top: 1px solid var(--is-border);
    margin-top: 20px;
    padding-top: 20px;
}
.lic-a,
.lic-profile {
    font-size: 16px;
    line-height: 1.7;
    color: var(--is-ink);
}
.lic-a {
    max-width: 72ch;
}
.lic-a p,
.lic-profile p {
    margin: 0 0 12px;
    max-width: 72ch;
}
.lic-a ul,
.lic-a ol,
.lic-profile ul {
    margin: 0 0 12px;
    padding-left: 22px;
    max-width: 72ch;
}
.lic-a li,
.lic-profile li {
    margin-bottom: 4px;
}
.lic-a > :last-child,
.lic-profile > :last-child {
    margin-bottom: 0;
}
@media (max-width: 575.98px) {
    .lic-card {
        padding: 20px;
    }
}

/* 4. The requirements: one block per license type, then the trainings and the exemptions ---- */
.lic-profile + .lic-profile,
.lic-block {
    border-top: 1px solid var(--is-border);
    margin-top: 24px;
    padding-top: 24px;
}
.lic-profile-name,
.lic-subtitle {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--is-heading);
    margin: 0 0 12px;
}
.lic-figures {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 36px;
    margin: 0 0 16px;
}
.lic-profile .lic-figure {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.lic-big {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--is-green-700);
}
.lic-figure-label {
    font-size: 14px;
    line-height: 1.3;
    color: var(--is-muted);
}
.lic-profile .lic-no-hours {
    font-weight: 600;
    color: var(--is-heading);
}
@media (max-width: 575.98px) {
    .lic-big {
        font-size: 34px;
    }
}

/* the product trainings: a two-column table, its rows stacked on a phone */
.lic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.6;
}
.lic-table thead th {
    background: var(--is-sunken);
    font-weight: 600;
    font-size: 13px;
    color: var(--is-muted);
    text-align: left;
    padding: 10px 14px;
}
.lic-table tbody th,
.lic-table tbody td {
    border-top: 1px solid var(--is-border);
    padding: 14px;
    text-align: left;
    vertical-align: top;
}
.lic-table tbody th {
    width: 38%;
    font-weight: 600;
    color: var(--is-heading);
}
.lic-training-situation {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    font-weight: 400;
    color: var(--is-muted);
}
.lic-table td p {
    margin: 0 0 6px;
}
.lic-table td p:last-child {
    margin-bottom: 0;
}
.lic-table .lic-training-applies {
    font-size: 14px;
    color: var(--is-muted);
}
@media (max-width: 575.98px) {
    .lic-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .lic-table tbody tr {
        display: block;
        border-top: 1px solid var(--is-border);
        padding: 14px 0;
    }
    .lic-table tbody th,
    .lic-table tbody td {
        display: block;
        width: auto;
        border-top: 0;
        padding: 0;
    }
    .lic-table tbody th {
        margin-bottom: 6px;
    }
}

/* 5. Look-ups, the regulator's contact card and the helpful links ----------------------------- */
.lic-card-side {
    padding: 20px 22px;
}
.lic-card-side .lic-q {
    font-size: 17px;
}
.lic-card-side .lic-a {
    font-size: 15px;
    line-height: 1.6;
}
.lic-card-side .lic-a p {
    margin-bottom: 10px;
}
.lic-card-side .lic-a > :last-child,
.lic-card-side .lic-a > p:last-child {
    margin-bottom: 0;
}
.lic-lookup a,
.lic-staff a {
    overflow-wrap: anywhere;
}
/* a look-up link: the URL underlined, the new-tab icon after it never alone on a line (Font
   Awesome's inline-block lets the line break before it, even after a no-break space) */
.lic-lookup a {
    text-decoration: none;
}
.lic-lookup .lic-url {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lic-lookup i {
    --fa-display: inline;
    font-size: 12px;
}
.lic-links p {
    margin-bottom: 8px;
}

/* Staff-written HTML (exemptions, contact card, links) from the old rich-text editor: inline
   colours and an underline span around each link (which drew a second line under the link's own),
   a <br> opening a paragraph, paragraphs inside list items */
.lic-staff [style*="color"] {
    color: inherit !important;
}
.lic-staff span[style*="underline"] {
    text-decoration: none !important;
}
.lic-staff p > br:first-child {
    display: none;
}
.lic-staff li > p {
    margin: 0;
}

/* 6. After the cards: the catalog again and the courtesy disclaimer --------------------------- */
/* no bottom margin: the footer's own top margin is the gap (the sticky footer makes #main a flex
   item, so a margin here would add to it) */
.lic-foot {
    margin-top: 40px;
}
.lic-foot p {
    margin: 0;
}
.lic-foot .lic-disclaimer {
    max-width: 90ch;
    margin-top: 24px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--is-muted);
}
