/* ═══════════════════════════════════════════════════════════
   ESL Shared Styles — supplemental to SSSLoanLite.css
   ESLVerification.aspx + ESLLoanSetup.aspx
   ═══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   PAGE HEADER — sticky header matching SSSLoanLite pattern
   ══════════════════════════════════════════════════════════ */
#stickyHeader {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    padding: 10px 0 6px;
    border-bottom: 2px solid #0db14b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
}

    #stickyHeader img.lb-logo {
        height: 32px;
        width: auto;
        margin-left: 4px;
        vertical-align: middle;
    }

    #stickyHeader .loan-type-row {
        margin: 0;
        display: inline-flex;
        align-items: center;
    }

        #stickyHeader .loan-type-row .label-font-standard {
            vertical-align: middle;
            line-height: 1;
            margin: 0;
            padding: 0;
            font-size: 25px;
        }

@media (max-width: 400px) {
    #stickyHeader img.lb-logo { height: 24px; }
    #stickyHeader .loan-type-row .label-font-standard { font-size: 16px !important; }
}
@media (min-width: 401px) and (max-width: 575px) {
    #stickyHeader .loan-type-row .label-font-standard { font-size: 20px !important; }
}

/* ── Hide master page elements not used on ESL pages ── */
#divButtons {
    display: none !important;
}

/* ── Error banner (ESL uses lblESLError / lblESLSetupError) ── */
#lblESLError,
#lblESLSetupError {
    background-color: #dc3545 !important;
    border-color:     #dc3545 !important;
    color:            #fff    !important;
}

/* ── Required field marker ── */
.esl-required {
    color: #dc3545;
    margin-left: 2px;
}

/* ── Calendar icon button ── */
.esl-cal-icon {
    background: #fff;
    border: 1px solid #ced4da;
    border-left: none;
    cursor: pointer;
    color: #555;
}
.esl-cal-icon:hover { background: #f0f0f0; }

/* ── Custom CAPTCHA ── */
.esl-captcha-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.esl-captcha-img {
    border: 1px solid #ced4da;
    border-radius: 3px;
    display: block;
    height: 52px;
    width: 170px;
}

.esl-captcha-refresh {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 3px;
    color: #0db14b;
    cursor: pointer;
    font-size: 15px;
    height: 34px;
    line-height: 1;
    padding: 0 10px;
    transition: background 0.15s;
}
.esl-captcha-refresh:hover { background: #f0f9f3; }

.esl-captcha-input {
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
   ESL SECTION TITLE BLOCK
   Used inside Confirmation and Success sections
   ══════════════════════════════════════════════════════════ */
.esl-title-block   { padding: 22px 0 10px; }
.esl-product-label { font-size: 14px; font-weight: 700; color: #231f20; margin: 0 0 4px; }
.esl-page-heading  { font-size: 22px; font-weight: 700; color: #0db14b; margin: 0 0 14px; letter-spacing: 0.5px; }
.esl-gold-rule     { border: none; border-top: 2px solid #c8a400; margin: 0 0 18px; }

/* ══════════════════════════════════════════════════════════
   ESL LOAN SETUP — two-column calculator grid
   ══════════════════════════════════════════════════════════ */
.eslsetup-form-box {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 0;
    background: #fff;
    overflow: hidden;
}

.eslsetup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
}

.eslsetup-left {
    padding: 24px 28px;
    border-right: 1px solid #dee2e6;
}

.eslsetup-right {
    padding: 24px 28px;
    background: #fff;
}

.eslsetup-field-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
}

.eslsetup-label {
    width: 130px;
    min-width: 130px;
    font-size: 13px;
    font-weight: 700;
    color: #231f20;
    padding-top: 7px;
    text-align: right;
    line-height: 1.4;
    font-family: Arial, sans-serif;
}

.eslsetup-label-break { display: none; }
.eslsetup-control     { flex: 1; }

.eslsetup-input {
    font-size: 13px;
    height: 34px;
    border-radius: 3px;
    border: 1px solid #ced4da;
}
.eslsetup-input:focus {
    border-color: #0db14b;
    box-shadow: 0 0 0 2px rgba(13,177,75,0.15);
    outline: none;
}

.eslsetup-term-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.eslsetup-term-input  { width: 120px; flex: none; }
.eslsetup-term-suffix { font-size: 13px; color: #555; font-weight: 600; white-space: nowrap; }

.eslsetup-hint {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    line-height: 1.5;
    flex-basis: 100%;
}

.eslsetup-err {
    color: #dc3545;
    font-size: 11px;
    font-style: italic;
    margin-top: 3px;
}

.eslsetup-warn {
    color: #856404;
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 11px;
    padding: 5px 8px;
    margin-top: 5px;
    line-height: 1.5;
}

.eslsetup-inner-rule { border: none; border-top: 1px solid #e0e0e0; margin: 16px 0; }

.eslsetup-select {
    font-size: 13px;
    height: 34px;
    border-radius: 3px;
    border: 1px solid #ced4da;
    background-color: #fff;
}

.eslsetup-beneficiary-heading {
    font-size: 13px;
    font-weight: 700;
    color: #231f20;
    margin: 4px 0 12px 142px;
}

.eslsetup-calc-row { margin-top: 18px; margin-left: 142px; }

.eslsetup-calc-btn {
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 3px;
    padding: 7px 22px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.eslsetup-calc-btn:hover { background: #f5f5f5; border-color: #0db14b; color: #0db14b; }

/* ── Results table (right panel) ── */
.eslsetup-result-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 13px;
}
.eslresult-row-main td      { padding: 7px 4px; vertical-align: top; }
.eslresult-row-sub td       { padding: 3px 4px 3px 20px; vertical-align: top; color: #555; }
.eslresult-row-deductions td { padding-bottom: 3px; }
.eslresult-row-netproceeds td { padding-top: 10px; border-top: 1px solid #dee2e6; }

.eslresult-label      { color: #231f20; font-weight: 400; width: 55%; line-height: 1.5; }
.eslresult-label-bold { font-weight: 700; }
.eslresult-label-sub  { font-size: 12px; color: #666; }
.eslresult-value      { text-align: right; color: #231f20; white-space: nowrap; }
.eslresult-value-bold { font-weight: 700; }
.eslresult-value-sub  { font-size: 12px; color: #555; text-align: right; }
.eslresult-value-green { color: #006837; font-size: 14px; }

.eslresult-disclaimer { font-size: 11px; color: #666; margin: 10px 0 2px; line-height: 1.5; }

/* ── Bottom navigation bar ── */
.eslsetup-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 10px;
    border-top: 2px solid #c8a400;
    margin-top: 0;
}

.eslsetup-btn-back {
    font-size: 14px;
    font-weight: 600;
    color: #0db14b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.eslsetup-btn-back:hover { color: #006837; text-decoration: none; }

.eslsetup-nav-right { display: flex; gap: 10px; align-items: center; }

.eslsetup-btn-cancel {
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 3px;
    padding: 8px 22px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}
.eslsetup-btn-cancel:hover { background: #f5f5f5; }

.eslsetup-btn-next {
    background: #c8d400;
    border: none;
    border-radius: 3px;
    padding: 8px 28px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}
.eslsetup-btn-next:hover:not(:disabled) { background: #b0bc00; }
.eslsetup-btn-next:disabled,
.eslsetup-btn-next[disabled] { background: #d4d4d4; color: #888; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════
   ESL LOAN DOCS — shared by principal (#divESLLoanDocs)
   and co-maker (#divCMKLoanDocs)
   ══════════════════════════════════════════════════════════ */
#divESLLoanDocs .doc-tab-bar,
#divCMKLoanDocs .doc-tab-bar {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #dee2e6;
}
#divESLLoanDocs .doc-tab-bar li,
#divCMKLoanDocs .doc-tab-bar li { margin-bottom: -2px; }
#divESLLoanDocs .doc-tab-bar .dtab,
#divCMKLoanDocs .doc-tab-bar .dtab {
    display: inline-block;
    padding: 9px 14px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    border: 1px solid transparent;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    white-space: nowrap;
    color: #555;
}
#divESLLoanDocs .doc-tab-bar .dtab:hover,
#divCMKLoanDocs .doc-tab-bar .dtab:hover      { color: #006837; background: #f5f5f5; }
#divESLLoanDocs .doc-tab-bar .dtab.active,
#divCMKLoanDocs .doc-tab-bar .dtab.active     { color: #006837; font-weight: bold; background: #fff; border-color: #dee2e6 #dee2e6 #fff; cursor: default; }
#divESLLoanDocs .doc-tab-bar .dtab.agreed,
#divCMKLoanDocs .doc-tab-bar .dtab.agreed     { color: #0db14b; }
#divESLLoanDocs .doc-tab-bar .dtab.locked,
#divCMKLoanDocs .doc-tab-bar .dtab.locked     { color: #bbb; cursor: not-allowed; pointer-events: none; }

#divESLLoanDocs .doc-panel,
#divCMKLoanDocs .doc-panel         { display: none; padding-top: 16px; }
#divESLLoanDocs .doc-panel.active,
#divCMKLoanDocs .doc-panel.active  { display: block; }

#divESLLoanDocs .doc-scroll-box,
#divCMKLoanDocs .doc-scroll-box {
    border: 1px solid #dee2e6;
    border-radius: 4px 4px 0 0;
    padding: 20px 24px;
    background: #fff;
    max-height: 360px;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #444;
    line-height: 1.8;
}
#divESLLoanDocs .doc-scroll-box h5,
#divCMKLoanDocs .doc-scroll-box h5 { color: #006837; font-weight: bold; margin-bottom: 12px; }
#divESLLoanDocs .doc-scroll-box p,
#divCMKLoanDocs .doc-scroll-box p  { margin-bottom: 10px; }

#divESLLoanDocs .doc-loading,
#divCMKLoanDocs .doc-loading {
    padding: 40px 0;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #888;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
}

#divESLLoanDocs .doc-agree-bar,
#divCMKLoanDocs .doc-agree-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    margin-bottom: 12px;
}

#divESLLoanDocs .btn-agree,
#divCMKLoanDocs .btn-agree {
    background: #0db14b;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 7px 22px;
    font-size: 13px;
    cursor: pointer;
    font-weight: bold;
}
#divESLLoanDocs .btn-agree:disabled,
#divCMKLoanDocs .btn-agree:disabled    { background: #ccc; cursor: not-allowed; }
#divESLLoanDocs .btn-agree.agreed-state,
#divCMKLoanDocs .btn-agree.agreed-state { background: #6c757d; }

#divESLLoanDocs .btn-cancel,
#divCMKLoanDocs .btn-cancel {
    background: #4a4a4a;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 7px 18px;
    font-size: 13px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#divESLLoanDocs .btn-cancel:hover,
#divCMKLoanDocs .btn-cancel:hover { background: #333; color: #fff; text-decoration: none; }

#divESLLoanDocs .doc-progress,
#divCMKLoanDocs .doc-progress         { margin-bottom: 16px; }
#divESLLoanDocs .doc-progress-label,
#divCMKLoanDocs .doc-progress-label   { font-size: 11px; color: #888; margin-bottom: 4px; }
#divESLLoanDocs .doc-progress-bar-wrap,
#divCMKLoanDocs .doc-progress-bar-wrap { background: #e9ecef; border-radius: 10px; height: 8px; overflow: hidden; }
#divESLLoanDocs .doc-progress-bar,
#divCMKLoanDocs .doc-progress-bar     { height: 8px; background: #0db14b; border-radius: 10px; transition: width 0.4s ease; }

/* ══════════════════════════════════════════════════════════
   CONFIRMATION — summary box + checkbox row
   ══════════════════════════════════════════════════════════ */
.eslconfirm-box {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #fff;
}

.eslconfirm-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 13px;
}
.eslconfirm-table tr + tr td { border-top: 1px solid #f0f0f0; }

.eslconfirm-label {
    padding: 10px 16px;
    font-weight: 700;
    width: 40%;
    text-align: right;
    color: #231f20;
    vertical-align: middle;
    line-height: 1.5;
}

.eslconfirm-value {
    padding: 10px 16px;
    color: #333;
    vertical-align: middle;
}

.eslconfirm-agree-row {
    background: #f8f9fa;
    padding: 14px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #333;
}
.eslconfirm-agree-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   SUCCESS — transaction banner
   ══════════════════════════════════════════════════════════ */
.eslsuccess-banner {
    border: 1px solid #0db14b;
    border-radius: 4px;
    padding: 14px 20px;
    margin-bottom: 20px;
    background: #fff;
}
.eslsuccess-text {
    color: #0db14b;
    font-size: 14px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .eslsetup-grid      { grid-template-columns: 1fr; }
    .eslsetup-left      { border-right: none; border-bottom: 1px solid #dee2e6; padding: 18px 16px; }
    .eslsetup-right     { padding: 18px 16px; }
    .eslsetup-label     { width: 110px; min-width: 110px; font-size: 12px; }
    .eslsetup-beneficiary-heading,
    .eslsetup-calc-row  { margin-left: 122px; }
    .eslsetup-label-break { display: inline; }
    .eslconfirm-label   { width: 45%; font-size: 12px; padding: 8px 10px; }
    .eslconfirm-value   { padding: 8px 10px; font-size: 12px; }
}

@media (max-width: 480px) {
    .eslsetup-field-group { flex-direction: column; gap: 4px; }
    .eslsetup-label       { width: 100%; text-align: left; padding-top: 0; }
    .eslsetup-beneficiary-heading,
    .eslsetup-calc-row    { margin-left: 0; }
}
