﻿/* ==========================================================================
   Index.aspx - responsive layout, section menu, modern choices
   Add to the stylesheet linked in Public.Master.
   ========================================================================== */
:root {
    --c-navy: #0b2e5c;
    --c-soft: #e8eef7;
    --c-line: #c9d3e0;
    --c-help: #0066cc;
}

.reg-page {
    padding: 20px;
    box-sizing: border-box;
    max-width: 100%;
    text-align: left;
}

    .reg-page *, .reg-page *::before, .reg-page *::after {
        box-sizing: border-box;
    }

/* ---- Section menu (replaces RadTabStrip) ---------------------------------- */
.site-tabs {
    margin-bottom: 0;
}

.tabs-toggle {
    display: none;
}

.tabs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 2px solid var(--c-navy);
}

    .tabs-list a {
        display: block;
        padding: 10px 14px;
        background: #eee;
        border: 1px solid #ddd;
        border-bottom: 0;
        border-radius: 4px 4px 0 0;
        color: #333;
        font-size: 1.1em;
        font-weight: bold;
        text-decoration: none;
    }

        .tabs-list a:hover {
            background: var(--c-soft);
        }

        .tabs-list a.active {
            background: var(--c-navy);
            border-color: var(--c-navy);
            color: #fff;
        }

.tab-panel[hidden] {
    display: none;
}

/* banner is 1000px wide; let it shrink on small screens (belongs with the master page styles) */
#header_wrapper img {
    max-width: 100%;
    height: auto;
}

/* ---- Sections and headings ------------------------------------------------ */
.HomeBox, .Box {
    width: 100%;
}

.reg-section {
    padding: 15px 0;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
/* global.css fixes HomeBox h3 at 40px (for the bullet image); let it grow when the heading wraps */
div.content div.HomeBox h3.section-header {
    height: auto;
    min-height: 40px;
}

.returning-link {
    padding: 8px 0 0;
    text-align: right;
}

.intro {
    padding: 10px 0;
    font-size: 1.2em;
    text-decoration: underline;
}

.questions {
    padding-top: 10px;
    font-size: 1.1em;
}

.step-note {
    padding-top: 10px;
    font-size: 1.1em;
}

.info-block, .agreement {
    padding: 10px 0;
}

.agreement {
    font-size: 1.1em;
}

.agree-box {
    margin-top: 6px;
    color: red;
    font-weight: bold;
}

.help-text {
    color: var(--c-help);
}

.alert-text {
    color: #f00;
}

.field-note {
    margin-top: 4px;
}

.forgot-link {
    margin-top: 6px;
}

.login-error {
    color: #f00;
}

.login-message {
    padding: 10px 15px;
    background: yellow;
    font-weight: bold;
}

/* ---- Form rows: label beside field on desktop, stacked on mobile ---------- */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-bottom: 12px;
}

.form-label {
    flex: 0 0 30%;
    text-align: right;
}

.form-field {
    flex: 1 1 0;
    min-width: 0;
}
    /* every text box, password box and dropdown: 400px on desktop, 95% on mobile */
    .form-field .formFieldOff, .form-field .formFieldOn, .form-field .regformSelect, .form-field .pw-wrapper {
        width: 400px;
        max-width: 100%;
    }

    .form-field .pw-wrapper {
        display: block;
    }

        .form-field .pw-wrapper .pw-input {
            width: 100%;
            padding-right: 34px;
        }
/* border-box counts padding + border inside the height, so 26 + 5 + 2 = the original 33px */
.reg-page .formFieldOff, .reg-page .formFieldOn, .reg-page .formFieldWaterMark {
    height: 33px;
}
/* room for the eye icon */

/* ---- Dialog content ------------------------------------------------------- */
.dialog-body {
    padding: 10px;
}

.dialog-summary {
    width: 100%;
    border: none;
}

.table-scroll {
    overflow-x: auto;
}

    .table-scroll .gridLite {
        width: 100%;
    }

/* ---- Choices: Yes/No toggle (.choice-toggle) and option cards (.choice-list) */
.choice-toggle input, .choice-list input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.choice-toggle label, .choice-list label {
    cursor: pointer;
    font-weight: 600;
    color: #1f2a37;
}

.choice-toggle input:focus-visible + label,
.choice-list input:focus-visible + label {
    outline: 3px solid #5b9bd5;
    outline-offset: 2px;
}

.choice-toggle {
    display: inline-flex;
    gap: 3px;
    margin-bottom: 6px;
    padding: 3px;
    border: 1.5px solid var(--c-line);
    border-radius: 999px;
}

    .choice-toggle label {
        min-width: 72px;
        padding: 7px 18px;
        border-radius: 999px;
        text-align: center;
    }

        .choice-toggle label:hover {
            background: var(--c-soft);
        }

    .choice-toggle input:checked + label {
        background: var(--c-navy);
        color: #fff;
    }

.choice-list br {
    display: none;
}

.choice-help {
    max-width: 460px;
    margin: -2px 0 10px;
    font-size: .9em;
}

.choice-list label {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 460px;
    margin-bottom: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--c-line);
    border-radius: 10px;
}

    .choice-list label::before {
        content: "";
        flex: 0 0 18px;
        height: 18px;
        border: 2px solid var(--c-line);
        border-radius: 50%;
        font: 900 11px/14px "Font Awesome 6 Free";
        color: #fff;
        text-align: center;
    }

.choice-list input[type=checkbox] + label::before {
    border-radius: 5px;
}

.choice-list label:hover, .choice-list input:checked + label {
    border-color: var(--c-navy);
}

.choice-list input:checked + label {
    background: var(--c-soft);
}

    .choice-list input:checked + label::before {
        border-color: var(--c-navy);
        background: var(--c-navy);
        box-shadow: inset 0 0 0 3px #fff;
    }

.choice-list input[type=checkbox]:checked + label::before {
    content: "\f00c";
    box-shadow: none;
}

.choice-list input:disabled + label {
    opacity: .45;
    cursor: not-allowed;
}

/* ---- Info tooltips (icon + popover built by initTips()) ------------------- */
.info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    border: 0;
    border-radius: 50%;
    color: var(--c-navy);
    font-size: .95em;
    text-decoration: none;
    vertical-align: middle;
}

    .info-tip:hover, .info-tip:focus-visible {
        background: var(--c-soft);
    }

    .info-tip:focus-visible {
        outline: 3px solid #5b9bd5;
        outline-offset: 1px;
    }

.tip-popover {
    position: absolute;
    z-index: 10000;
    max-width: min(26rem, calc(100vw - 24px));
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(11, 46, 92, .18);
    color: #1f2a37;
    font-size: .9rem;
    font-weight: normal;
    line-height: 1.45;
    text-align: left;
}

    .tip-popover[hidden] {
        display: none;
    }

/* ---- Mobile --------------------------------------------------------------- */
@media (max-width: 768px) {
    .reg-page {
        padding: 12px;
    }

    .tabs-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 12px 14px;
        background: var(--c-navy);
        border: 0;
        border-radius: 6px;
        color: #fff;
        font-family: inherit;
        font-size: 1.1em;
        font-weight: bold;
        cursor: pointer;
    }

    .tabs-list {
        display: none;
        flex-direction: column;
        gap: 0;
        border: 1px solid var(--c-line);
        border-top: 0;
        border-radius: 0 0 6px 6px;
    }

    .site-tabs.open .tabs-toggle {
        border-radius: 6px 6px 0 0;
    }

    .site-tabs.open .tabs-list {
        display: flex;
    }

    .tabs-list a {
        border: 0;
        border-top: 1px solid var(--c-line);
        border-radius: 0;
        background: #fff;
    }

    .returning-link {
        text-align: left;
    }

    .form-label {
        flex-basis: 100%;
        text-align: left;
    }

    .form-field .formFieldOff, .form-field .formFieldOn, .form-field .regformSelect, .form-field .pw-wrapper {
        width: 95%;
    }

    .choice-list label, .choice-help {
        max-width: none;
    }
}
