/* ============================================================
   OwnersPath Pre-Qualification Wizard — prequalification.css
   Reuses existing CSS variables from member-dashboard.css
   and frontend.css where possible.
   ============================================================ */

/* ── Variables (aligned with existing theme) ───────────────── */
:root {
    --preq-navy:         var(--mb-olive, #1a3a5c);
    --preq-navy-dark:    var(--mb-olive-dark, #152e4a);
    --preq-olive:        var(--mb-olive-light, #8a9a5b);
    --preq-olive-dark:   var(--mb-olive, #6f7d49);
    --preq-body-bg:      #f4f4f0;
    --preq-card-radius:  12px;
    --preq-shadow:       0 4px 14px rgba(0, 0, 0, 0.08);
    --preq-strip-width:  190px;
    --preq-label-color:  #444;
    --preq-font:         'Inter', sans-serif;
}

/* ── Page scaffolding ──────────────────────────────────────── */
.preq-body {
    background: var(--preq-body-bg);
    font-family: var(--preq-font);
    margin: 0;
    padding: 0;
}

.preq-page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Left navy strip ───────────────────────────────────────── */
.preq-left-strip {
    width: var(--preq-strip-width);
    min-width: var(--preq-strip-width);
    background: var(--preq-navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.preq-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.preq-logo {
    max-width: 140px;
    height: auto;
}

.preq-logo-fallback {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    gap: 0.4rem;
    align-items: center;
}

/* ── Main content area ─────────────────────────────────────── */
.preq-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Top white bar (always shown, same for auth & guest) ─────── */
.preq-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e8e8e4;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.preq-topbar-left  { flex: 1; }
.preq-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preq-topbar-meta {
    font-size: 0.98rem;
    color: #555;
}

/* ── Page content below topbar ──────────────────────────────── */
.preq-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preq-content-area {
    padding: 2rem;
    flex: 1;
}

/* ── Two-column layout: form card + right sidebar ──────────── */
.preq-two-col {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 1.5rem;
}

/* ── Form card ─────────────────────────────────────────────── */
.preq-form-card {
    background: #fff;
    border-radius: var(--preq-card-radius);
    box-shadow: var(--preq-shadow);
    padding: 2rem;
    flex: 1 1 66%;
    min-width: 0;
}

.preq-section-title {
    color: var(--preq-navy);
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--preq-olive);
    padding-bottom: 0.5rem;
}

.preq-label {
    color: var(--preq-label-color);
    font-weight: 500;
    font-size: 1.03rem;
}

.preq-sublabel {
    font-size: 0.92rem;
    color: #777;
    display: block;
    margin-bottom: 0.2rem;
}

.preq-input {
    font-size: 1.03rem;
    border-radius: 6px;
}

.preq-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: var(--preq-navy);
    font-weight: 600;
    font-size: 1.03rem;
}

.preq-section-divider::before,
.preq-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

/* ── Buttons ───────────────────────────────────────────────── */
.preq-btn-row {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.preq-btn-row--split {
    justify-content: space-between;
}

.project-submit-btn {
    padding: 0.5rem 1.8rem;
    font-weight: 600;
    font-size: 1.03rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.project-box-color {
    background: var(--preq-navy);
    color: #fff;
    border-color: var(--preq-navy);
}

.project-box-color:hover,
.project-box-color:focus {
    background: var(--preq-navy-dark);
    border-color: var(--preq-navy-dark);
    color: #fff;
}

.project-box-color-outline {
    background: transparent;
    color: var(--preq-navy);
    border-color: var(--preq-navy);
}

.project-box-color-outline:hover,
.project-box-color-outline:focus {
    background: var(--preq-navy);
    color: #fff;
}

.project-box-color-sm {
    background: var(--preq-olive);
    color: #fff;
    border-color: var(--preq-olive);
    padding: 0.3rem 1rem;
    font-size: 0.98rem;
}

.project-box-color-sm:hover {
    background: var(--preq-olive-dark);
    border-color: var(--preq-olive-dark);
}

.preq-continue-btn {
    min-width: 175px;
    justify-content: center;
}

/* ── Guest (unauthorized) wrapper — no sidebar, blank topbar ── */
.preq-guest-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--preq-body-bg);
}

.preq-guest-wrapper .mb-topbar {
    padding: 0 1.5rem;
}

.preq-guest-logo {
    height: 36px;
    width: auto;
}

.preq-guest-wrapper .mb-main-content {
    flex: 1;
}

/* Ensure blank topbar for unauthorized users has same height as authenticated topbar */
.preq-topbar-guest {
    min-height: 56px;
}

/* ── Wizard page heading ─────────────────────────────────────── */
.preq-wizard-heading {
    font-size: 1.09rem;
    font-weight: 700;
    color: var(--preq-navy);
    margin-bottom: 0.6rem;
    letter-spacing: 0.01em;
}

/* ── Step navigation — chevron arrow tabs ──────────────────── */
#dvGoal .steps-design {
    display: flex;
    align-items: stretch;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    margin-bottom: 20px;
}

#dvGoal .project-box-color {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px 12px 18px;
    min-height: 70px;
    text-align: center;
}

/* ── Inactive step ──────────────────────────────────────────── */
#dvGoal .project-box-color.inactive-tab-step {
    background: #dfdedd;
}

#dvGoal .project-box-color.inactive-tab-step h2 {
    color: #858585;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#dvGoal .project-box-color.inactive-tab-step p {
    color: #999999;
    font-size: 14px;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Grey chevron (foreground) — same colour as box, sits in front of white outline */
#dvGoal .project-box-color.inactive-tab-step::before {
    content: "";
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top:    40px solid transparent;
    border-bottom: 40px solid transparent;
    border-left:   17.5px solid rgb(223, 222, 221);
    border-radius: 30px;
    z-index: 2;
}

/* White chevron (background outline) — slightly larger; peeks out as white ring around grey arrow */
#dvGoal .project-box-color.inactive-tab-step::after {
    content: "";
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top:    45px solid transparent;
    border-bottom: 45px solid transparent;
    border-left:   18.75px solid rgb(255, 255, 255);
    border-radius: 10px;
    z-index: 1;
    display: block;
}

/* ── Active step ────────────────────────────────────────────── */
#dvGoal .project-box-color.active-tab-step {
    background: #ffffff;
    border: 3px solid #6aa6a6;
    border-radius: 20px 10px 10px 20px;
    z-index: 2;
    margin: -1px;
    padding: 12px 40px 12px 20px;
}

#dvGoal .project-box-color.active-tab-step h2 {
    color: #222222;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#dvGoal .project-box-color.active-tab-step p {
    color: #e6a817;
    font-size: 14px;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Outer teal chevron */
#dvGoal .project-box-color.active-tab-step::before {
    content: "";
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top:    38.75px solid transparent;
    border-bottom: 38.75px solid transparent;
    border-left:   17.5px solid rgb(106, 166, 166);
    border-radius: 30px;
    z-index: 1;
}

/* Inner white chevron — hides content behind the teal border */
#dvGoal .project-box-color.active-tab-step::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top:    35px solid transparent;
    border-bottom: 35px solid transparent;
    border-left:   15px solid rgb(255, 255, 255);
    border-radius: 10px;
    z-index: 2;
}

/* Step 4 (last step): flat right edge — no arrow */
#dvGoal .project-box-color:last-child::before,
#dvGoal .project-box-color:last-child::after {
    display: none !important;
}

/* Safety net: hide any accidental empty element that ends up inside .steps-design */
#dvGoal .steps-design > div:empty,
#dvGoal .steps-design > :not(.project-box) {
    display: none !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* ── Shield icon (active step only) ────────────────────────── */
.step-shield-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #6aa6a6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-shield-icon::after {
    content: '\2713';
    font-size: 12px;
    color: #6aa6a6;
    font-weight: 700;
    line-height: 1;
}

/* ── Right sidebar / virtual coach ─────────────────────────── */
.right-sdebar-panel {
    width: 325px;
    min-width: 325px;
    max-width: 325px;
    flex: 0 0 325px;        /* fixed — never grows or shrinks */
}

/* "More information" video image fills the sidebar width (replaces the old talking-head box) */
.right-sdebar-panel .coach-more-info { float: none; width: 100%; margin: 0 0 12px; }

.preq-coach-header {
    background: var(--preq-navy);
    color: #fff;
    border-radius: var(--preq-card-radius) var(--preq-card-radius) 0 0;
    padding: 1rem 1.2rem;
}

.preq-coach-header h5 {
    margin: 0 0 0.2rem;
    font-weight: 700;
    font-size: 1.15rem;
}

.preq-coach-header p {
    margin: 0;
    font-size: 0.94rem;
    opacity: 0.85;
}

.preq-video-wrap {
    background: #fff;
    padding: 0.75rem;
    text-align: center;
}

.preq-coach-badges {
    background: #fff;
    border-radius: 0 0 var(--preq-card-radius) var(--preq-card-radius);
    padding: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    box-shadow: var(--preq-shadow);
}

.preq-badge-img {
    max-height: 40px;
    width: auto;
}

/* ── Results page ───────────────────────────────────────────── */
.preq-results-section {
    margin-top: 1rem;
}

.preq-results-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--preq-navy);
    margin-bottom: 0.75rem;
}

.preq-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preq-results-list li {
    padding: 0.35rem 0;
    font-size: 1.03rem;
    border-bottom: 1px solid #f0f0ec;
}

/* ── Results tables (3-column: Item | Yes | Not Yet) ──────────── */
.resultmaintable {
    margin-bottom: 0.75rem;
}

.result-table {
    width: 80%;
    border-collapse: collapse;
    font-size: 1.01rem;
    margin-bottom: 0;
}

.result-th-main {
    width: 50%;
    background: silver;
    font-weight: 700;
    line-height: 25px;
    padding: 0.3rem 0.5rem;
    color: #222;
}

.result-th-col {
    width: 15%;
    background: silver;
    font-weight: 700;
    line-height: 25px;
    padding: 0.3rem 0.5rem;
    color: #222;
}

.result-table tbody tr td {
    padding: 0.3rem 0.5rem;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    font-size: 1rem;
}

.result-table .result-yes {
    color: #2a7a2a;
    font-weight: 700;
    font-size: 1.15rem;
}

.result-table .result-no {
    color: #c0392b;
    font-weight: 700;
    font-size: 1.15rem;
}

.result-footer {
    padding: 0.4rem 0.5rem;
    font-size: 0.92rem;
    color: #555;
    font-style: italic;
    background: #f5f5f5;
}

.preq-results-intro {
    font-size: 1.09rem;
    color: #333;
    margin-bottom: 1rem;
}

.NoRecordFound {
    padding: 1rem;
    background: #fff8e1;
    border-left: 4px solid #f0a500;
    border-radius: 4px;
    font-size: 1.03rem;
    color: #7a5c00;
}

.preq-credentials-box {
    background: #f5f5f5;
    border: 1px solid #ccc;
    padding: 0.75rem 1rem;
    font-size: 1.03rem;
    margin-top: 0.5rem;
}

.preq-login-btn {
    font-weight: 700;
    padding: 0.5rem 1.5rem;
}

/* ── Experian result box (Step 3) ──────────────────────────── */
.preq-experian-box {
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #fff;
    margin-bottom: 1rem;
}

.preq-experian-box .exp-status-label {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.35rem;
}

.preq-experian-box .exp-biz-name {
    color: #1a60a0;
    font-weight: 600;
    text-decoration: underline;
    margin-bottom: 0.35rem;
}

.preq-experian-box .exp-match-msg {
    margin-bottom: 0.4rem;
}

.preq-experian-box ul {
    margin: 0 0 0.4rem 0;
    padding-left: 1.25rem;
    max-height: 140px;
    overflow-y: auto;
}

.preq-experian-box ul li a {
    color: #1a60a0;
    font-weight: 600;
    text-decoration: underline;
}

.preq-experian-box ul li a:hover {
    color: #0d3d6e;
}

.preq-experian-box ul li small {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-top: 1px;
}

.exp-credit-metrics {
    display: flex;
    gap: 0.5rem;
    margin: 0.6rem 0 0.4rem 0;
}

.exp-metric {
    flex: 1;
    text-align: center;
}

.exp-metric-label {
    color: #1a60a0;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
    text-decoration: underline;
}

.exp-metric-value {
    font-weight: 700;
    color: #222;
    font-size: 1.03rem;
}

.exp-move-on {
    font-size: 0.94rem;
    color: #444;
    margin-top: 0.3rem;
}

/* ── Step 1 form: label-left / input-right inline layout ─────── */
.form-row-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-row-item > label {
    width: 220px;
    min-width: 220px;
    font-size: 17px;
    color: #333333;
    font-weight: 500;
    padding-right: 10px;
    flex-shrink: 0;
}

.form-field {
    flex: 1;
    min-width: 0;
}

.form-field .form-control,
.form-field .form-select {
    width: 100%;
}

/* Contact Name: First: [input] Last: [input] all on one row */
.contact-name-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.contact-name-inputs .cn-label {
    font-size: 17px;
    color: #333333;
    white-space: nowrap;
    flex-shrink: 0;
}

.contact-name-inputs .form-control {
    flex: 1;
    min-width: 80px;
}

/* Continue button centered */
.btn-wrap {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 20px;
}

/* ── Page title (h1 above the white card) ───────────────────── */
h1.page-header {
    font-size: 21px;
    font-weight: 700;
    color: #000000;
    margin: 20px 0 10px;
    padding-bottom: 9px;
    border-bottom: none;
}

/* ── Outer layout: card (left) + sidebar (right) ─────────────── */
.FundabilityTestStep {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    gap: 40px;                  /* spacing between the card and the coach sidebar */
    overflow: hidden;           /* prevents sidebar from bleeding over card */
}

.RightPanel.w-66 {
    flex: 1 1 0%;               /* grows to fill remaining space */
    min-width: 0;               /* critical — prevents flex overflow */
    max-width: calc(100% - 325px - 40px);
    overflow: hidden;
}

.ClearBoth {
    clear: both;
}

/* ── White card (.page-body) ─────────────────────────────────── */
.page-body {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 4px 20px 0px;
    padding: 30px 0 0 0;
    overflow: hidden;
    margin-bottom: 20px;
}

/* ── Step indicator container padding (inside card at top) ───── */
#dvGoal {
    width: 100%;
    overflow: hidden;
    padding: 0 30px 0 15px;
}

/* ── Bottom badges (outside white card, inside .RightPanel) ──── */
.right-panel-btm-logo {
    display: flex;
    justify-content: space-between;
    padding: 0 0 15px;
    align-items: center;
}

.right-panel-btm-logo img {
    max-height: 50px;
    width: auto;
}

/* ── Virtual Coach Video container ──────────────────────────────
   Matches the treatment used on the Coach step pages (step-1-1.asp
   etc. — see .videoposition rules in member-dashboard.css and the
   enhance()/setupPoster() logic in frontend.js): #e8e8e8 background
   instead of the source clip's baked-in black, the widget's own
   unstyled poster hidden in favor of the injected .vp-poster overlay,
   and its control bar kept but shrunk/centered. The 1_{spokesmodel}.js
   script used here targets #wthvideo1 specifically (not the bare
   #wthvideo the 5_/7_-numbered scripts use), so both ids are covered
   defensively — same reasoning as .videoposition's own dual coverage. */
#wthvideo2 {
    width: 325px;
    height: 322.5px;
    background: #e8e8e8;
    display: block;
    overflow: hidden;
    position: relative;   /* re-roots the spokesmodel JS's fixed-positioned video/poster
                              elements to this box instead of the viewport — otherwise
                              they escape this container and overlap the caption below */
    transform: translateZ(0);
}

#wthvideo2 #wthvideo-wrapper,
#wthvideo2 #wthvideo,
#wthvideo2 #wthvideo1,
#wthvideo2 #controls {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    transform: none !important;
    overflow: hidden !important;
    background: transparent !important;
    justify-content: center !important;
}

#wthvideo2 video { display: none !important; }
#wthvideo2 #bufferCanvas { display: none !important; }
#wthvideo2 canvas {
    display: block !important;
    position: absolute !important;
}
#talkingCanvas {
    left: 50% !important;
    transform: translateX(-50%);
}

/* The widget's own poster image is unstyled/unconstrained at its native
   pixel size — hidden in favor of the .vp-poster overlay that
   /js/frontend.js injects (same as the step pages). Its control bar
   (play/restart/mute/close) is kept, just resized/centered. */
#wthvideo2 #poster { display: none !important; }
#wthvideo2 #playerBar {
    left: 50% !important;
    right: auto !important;
    bottom: 4px !important;
    transform: translateX(-50%) !important;
    padding: 1px !important;
}
#wthvideo2 #playerBar img {
    width: 22px !important;
    height: auto !important;
    max-width: 22px !important;
}

/* .vp-poster (member-dashboard.css) defaults to a fixed 195px height sized
   for the step pages' shorter box that also has to leave room for a caption
   strip inside the same element — here the caption (.become-coach) is a
   separate element below #wthvideo2, so the poster can use the box's full
   height instead. */
#wthvideo2 .vp-poster { height: 100% !important; }

/* ── Becoming Bankable caption ───────────────────────────────── */
.become-coach {
    background: #fff;
    color: var(--mb-olive);
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    padding: 5px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    position: relative;
    z-index: 1;
}

/* ── 150 Points / 3 Goals panels ─────────────────────────────── */
.points_box {
    padding: 15px 0;
    display: block;
}

.points_box img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.points_box p {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
    line-height: 1.4;
}

.points_box span,
.points_box ol {
    font-size: 18px;
    color: #333333;
    margin: 0;
    line-height: 1.55;
}

.points_box ol {
    padding-left: 18px;
}

.points_box ol li {
    margin-bottom: 4px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991px) {
    .preq-two-col {
        flex-direction: column;
    }

    .FundabilityTestStep {
        flex-direction: column;
    }

    .right-sdebar-panel {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .RightPanel.w-66 {
        max-width: 100%;
    }

    #wthvideo2 {
        width: 100%;
        height: auto;
        min-height: 200px;
    }

    .preq-left-strip {
        width: 60px;
        min-width: 60px;
        padding: 1rem 0.5rem;
    }

    .preq-logo {
        max-width: 40px;
    }
}

@media (max-width: 1200px) {
    #dvGoal .project-box-color h2 {
        font-size: 15px;
    }
    #dvGoal .project-box-color p {
        font-size: 12px;
    }
}

@media (max-width: 575px) {
    #dvGoal .project-box-color {
        padding: 8px 28px 8px 10px;
        min-height: 56px;
    }
    #dvGoal .project-box-color.active-tab-step {
        padding: 8px 30px 8px 14px;
    }
    #dvGoal .project-box-color h2 {
        font-size: 14px;
    }
    #dvGoal .project-box-color p {
        display: none;
    }
    #dvGoal .project-box-color.inactive-tab-step::before {
        border-top-width:    29px;
        border-bottom-width: 29px;
        border-left-width:   14px;
        border-left-color:   rgb(223, 222, 221);
        right: -10px;
    }
    #dvGoal .project-box-color.inactive-tab-step::after {
        border-top-width:    33px;
        border-bottom-width: 33px;
        border-left-width:   15.5px;
        right: -12px;
    }
    #dvGoal .project-box-color.active-tab-step::before {
        border-top-width:    27px;
        border-bottom-width: 27px;
        border-left-width:   14px;
        right: -12px;
    }
    #dvGoal .project-box-color.active-tab-step::after {
        border-top-width:    24px;
        border-bottom-width: 24px;
        border-left-width:   11px;
        right: -9px;
    }
}
