/* Markel Direct brand chrome for the Vue quote journey. Mirrors the legacy Markel
   site: off-white canvas, orange top-accent header/footer, Markel Sans, burnt-orange CTAs. */

@font-face {
    font-family: 'Markel Sans';
    font-weight: 400;
    font-display: swap;
    src: url('../lib/fonts/230224_Markel_Sans/MarkelSansWebFonts/WOFF2/MarkelSans-Regular.woff2') format('woff2'),
         url('../lib/fonts/230224_Markel_Sans/MarkelSansWebFonts/WOFF/MarkelSans-Regular.woff') format('woff');
}
@font-face {
    font-family: 'Markel Sans';
    font-weight: 600;
    font-display: swap;
    src: url('../lib/fonts/230224_Markel_Sans/MarkelSansWebFonts/WOFF2/MarkelSans-Medium.woff2') format('woff2'),
         url('../lib/fonts/230224_Markel_Sans/MarkelSansWebFonts/WOFF/MarkelSans-Medium.woff') format('woff');
}
@font-face {
    font-family: 'Markel Sans';
    font-weight: 700;
    font-display: swap;
    src: url('../lib/fonts/230224_Markel_Sans/MarkelSansWebFonts/WOFF2/MarkelSans-Bold.woff2') format('woff2'),
         url('../lib/fonts/230224_Markel_Sans/MarkelSansWebFonts/WOFF/MarkelSans-Bold.woff') format('woff');
}

:root {
    --md-accent: #ff4e00;   /* bright orange: top-accent bars + links */
    --md-primary: #bf3b00;  /* burnt orange: primary CTAs */
    --md-off-white: #f4f2eb;/* header/footer background */
    --md-bg: #424242;       /* dark-grey page canvas the journey card sits on */
    --md-ink: #424242;      /* body text */
    /* Single lever the vendored engine already reads: drives vueform inputs and the
       quote-display buttons to the Markel primary (see _singleSchemeQuote.scss, _vueformCustom.scss). */
    --theme-form-primary: #bf3b00;
}

body {
    margin: 0;
    font-family: 'Markel Sans', Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--md-ink);
    background-color: var(--md-bg);
    /* Sticky footer: fill at least the viewport and let .md-main grow so the footer sits at the
       bottom even when the journey content is shorter than the screen. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--md-primary); }   /* links use the dark Markel orange */

/* Header: off-white bar, bright-orange top accent, logo left, help block right. */
/* Logged-in account strip (shown site-wide when authenticated), styled to match Markel Direct:
   a cream bar with "Logged in as" on the left and uppercase MyPolicy / Logout links on the right. */
.md-account-strip { background: var(--md-off-white); border-bottom: 1px solid #e0e0e0; }
.md-account-inner {
    max-width: 984px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    min-height: 48px;
}
.md-account-user { margin-right: auto; color: #212529; font-size: 15px; }
.md-account-link {
    color: #424242;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    padding: 0 12px;
    line-height: 48px;
    text-decoration: none;
}
.md-account-link:hover { text-decoration: underline; }
.md-account-links { display: flex; align-items: center; }

/* Narrow screens: the account links move into the header "Menu" dropdown (see .md-account-menu), so the
   strip shows just the logged-in name here. */
@media (max-width: 881px) {
    .md-account-prefix { display: none; }
    .md-account-user { margin-right: auto; font-weight: 600; }
    .md-account-links { display: none; }
}

.md-header {
    position: relative;   /* anchor for the mobile help dropdown */
    background-color: var(--md-off-white);
    border-bottom: 1px solid #e0e0e0;
    box-shadow: inset 0 4px 0 0 var(--md-accent);
}
.md-header .md-header-inner {
    max-width: 984px;    /* match Markel Direct's .container override */
    margin: 0 auto;
    min-height: 88px;    /* MD logo block (48px + 20/20 margins); the contact block drives the rest */
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* MD spacing exactly: logo 48px with 20px top/bottom margin; contact padding 20/0/16 — so the header
   height matches MD by construction (contact is the taller block). */
.md-header .md-logo { height: 48px; width: auto; margin: 20px 0; }
.md-header .md-contact { text-align: right; padding: 20px 0 16px; line-height: 1.5; }
.md-header .md-contact .md-help-label { font-size: 1.14rem; font-weight: 400; line-height: 1.4; }
.md-header .md-contact .call { font-size: 1.14rem; }
.md-header .md-contact .call b { font-size: 1.35rem; font-weight: 600; line-height: 0.9; }
.md-header .md-contact .open-times { display: block; font-size: 0.75rem; color: #5b6169; }
.md-header .md-contact .md-header-links { display: block; }
.md-header .md-contact .md-header-links a { color: var(--md-primary); text-decoration: underline; font-size: 0.76rem; }
.md-header .md-contact .md-header-links a.md-login { margin-left: 16px; }
/* Logged-in account links live in the desktop account strip; in the header they appear only inside the
   mobile "Menu" dropdown (shown in the @media block below). */
.md-header .md-contact .md-account-menu { display: none; }

/* Mobile "Menu" toggle (hidden on desktop). */
.md-help-burger { display: none; }

@media (max-width: 881px) {
    .md-header .md-header-inner { height: 56px; min-height: 0; }
    .md-header .md-logo { height: 32px; margin: 12px 0; }   /* MD mobile: 32px + 12/12 = 56px */

    .md-help-burger {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        padding: 8px;
        color: #424242;
        font-size: 0.9rem;
        cursor: pointer;
    }
    .md-help-burger-icon {
        position: relative;
        display: inline-block;
        width: 18px;
        height: 2px;
        background: #424242;
        transition: background-color .2s ease;
    }
    .md-help-burger-icon::before,
    .md-help-burger-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 18px;
        height: 2px;
        background: #424242;
        transition: transform .2s ease, top .2s ease;
    }
    .md-help-burger-icon::before { top: -5px; }
    .md-help-burger-icon::after { top: 5px; }

    /* Full-width dropdown panel below the header, shown when "Menu" is tapped. */
    .md-header .md-contact {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1001;
        padding: 0;          /* reset the desktop contact padding; rows carry their own */
        text-align: left;
        background: var(--md-off-white);
        border-bottom: 1px solid #e2dedc;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    }
    .md-help-toggle:checked ~ .md-contact { display: block; }

    .md-header .md-contact .md-contact-row { padding: 16px; }
    .md-header .md-contact .md-contact-help { border-bottom: 1px solid #e2dedc; }
    .md-header .md-contact .md-help-label { display: block; font-weight: 600; margin-bottom: 4px; }
    .md-header .md-contact .call b { font-size: 1.2rem; }
    .md-header .md-contact .open-times { margin-top: 2px; }
    .md-header .md-contact .md-header-links { margin-top: 0; }
    .md-header .md-contact .md-header-links a { display: block; font-size: 0.95rem; padding: 4px 0; }
    .md-header .md-contact .md-header-links a.md-login { margin-left: 0; }

    /* Logged-in account links folded into the Menu dropdown (replacing the removed account burger). */
    .md-header .md-contact .md-account-menu { display: block; border-top: 1px solid #e2dedc; }
    .md-header .md-contact .md-account-menu a { display: block; font-size: 0.95rem; padding: 4px 0; color: var(--md-primary); text-decoration: underline; }

    /* Burger morphs to an X while the panel is open. */
    .md-help-toggle:checked ~ .md-help-burger .md-help-burger-icon { background: transparent; }
    .md-help-toggle:checked ~ .md-help-burger .md-help-burger-icon::before { top: 0; transform: rotate(45deg); }
    .md-help-toggle:checked ~ .md-help-burger .md-help-burger-icon::after { top: 0; transform: rotate(-45deg); }
}

/* Journey content: a centered column over the dark-grey canvas. The engine's
   .quote-container provides the off-white form card, so this is just the frame. */
.md-main {
    width: 100%;
    max-width: 984px;    /* match Markel Direct's .container override (main_styles.less) */
    margin: 24px auto;
    padding: 0;          /* cards sit flush to the screen sides (MD) */
    box-sizing: border-box;
    flex: 1 0 auto;      /* grow to push the footer to the bottom (sticky footer) */
}
.md-footer { flex-shrink: 0; }

/* MyPolicy (portal SPA, mounted on #portal-app) keeps the previous wider chrome — the 984 quote-journey
   width is too narrow for the dashboard / quote list and overflows. Scoped so the quote journey stays 984. */
body:has(#portal-app) .md-main { max-width: 1170px; }
body:has(#portal-app) .md-header .md-header-inner,
body:has(#portal-app) .md-account-inner,
body:has(#portal-app) .md-footer .md-footer-inner { max-width: 1140px; }

/* Off-white step title above the form card (Markel / tax-defense .page-title). */
.md-page-title { margin: 0 0 12px; padding: 0 16px; color: var(--md-off-white); font-size: 40px; font-weight: 500; }
.md-page-title:empty { display: none; }

/* Journey card: form + "Why insure with us" together in one off-white container with a divider. */
.md-journey {
    display: flex;
    align-items: stretch;
    background: var(--md-off-white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
    overflow: hidden;
}
/* 8/4 split like MD (col-sm-8 / col-sm-4): form takes 2 parts, "why insure" 1 part. When the sidebar
   hides below 991px, the form grows to fill the row. border-box so the padding stays inside each share. */
.md-journey-main { flex: 2 1 0; min-width: 0; box-sizing: border-box; padding: 32px 40px; }

.md-why { flex: 1 1 0; box-sizing: border-box; padding: 32px; border-left: 1px solid #d4d8de; color: #212529; }
.md-why-title { margin: 0 0 16px; font-size: 1.5rem; font-weight: 500; color: #212529; }
.md-why-list { list-style: none; margin: 0; padding: 0; }
.md-why-list li {
    position: relative;
    padding: 6px 0 6px 26px;
    font-size: 0.9rem;
    line-height: 1.4;
}
.md-why-list li::before {
    content: "\2713"; /* check — neutral, no brand colour (note 2) */
    position: absolute;
    left: 0;
    top: 6px;
    color: #212529;
    font-weight: 700;
}

@media (max-width: 991px) {
    .md-why { display: none; }
}

/* Quote display + additional questions steps: the SingleScheme views provide their own
   form/covers + summary columns, so drop the journey card chrome and the "Why insure"
   sidebar to avoid a competing third column. */
.md-journey:has(.single-scheme-quote),
.md-journey:has(.quote-additional),
.md-journey:has(.quote-registration) {
    display: block;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.md-journey:has(.single-scheme-quote) .md-why,
.md-journey:has(.quote-additional) .md-why,
.md-journey:has(.quote-registration) .md-why { display: none; }
.md-journey:has(.single-scheme-quote) .md-journey-main,
.md-journey:has(.quote-additional) .md-journey-main,
.md-journey:has(.quote-registration) .md-journey-main { padding: 0; }

/* Mobile: trim the question-step container padding (default 32px 40px) so the fieldsets aren't
   over-constricted */
@media (max-width: 767px) {
    .md-journey-main { padding: 24px 16px; }
}

/* Stepper strip: part of the header region (off-white), above the dark content (note 1). */
.md-stepper-strip {
    background: var(--md-off-white);
    border-bottom: 1px solid #e0e0e0;
    padding: 22px 0;   /* MD .progress-info margin 22px 0 — matches the stepper band height */
}
.md-stepper-strip:empty { display: none; }
/* border-box so max-width 984 INCLUDES the 50px side padding → 884px dot track, matching MD (984
   container minus progress-info's 0 50px padding). Without it the dots would span the full 984. */
.md-stepper-strip .step-menu { max-width: 984px; margin: 0 auto; padding: 0 50px; box-sizing: border-box; }
@media (max-width: 881px) { .md-stepper-strip .step-menu { padding: 0 25px; } }
@media (max-width: 554px) { .md-stepper-strip .step-menu { padding: 0; } }

/* Static coarse stepper for standalone MVC pages (e.g. Payment) that have no Vue journey to
   teleport the tracker. Mirrors the journey's four-stage look with self-contained colours. */
.md-cstep {
    display: flex;
    align-items: center;
    max-width: 984px;
    margin: 0 auto;
    padding: 0 50px;
    box-sizing: border-box;   /* 884px dot track inside the 984 container (MD) */
    list-style: none;
}
.md-cstep-item { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.md-cstep-link { display: flex; align-items: center; text-decoration: none; cursor: pointer; }
.md-cstep-item::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e2dedc;
    margin: 0 12px;
    min-width: 16px;
}
.md-cstep-item:last-child { flex: 0 0 auto; }
.md-cstep-item:last-child::after { display: none; }
.md-cstep-dot {
    flex: 0 0 auto;
    width: 23px;
    height: 23px;
    border: 1px solid #e2dedc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a39990;
}
.md-cstep-label {
    margin-left: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a39990;
    white-space: nowrap;
}
.md-cstep-check {
    border: solid var(--md-off-white);
    border-width: 0 2px 2px 0;
    height: 10px;
    width: 6px;
    transform: rotate(45deg);
    margin-top: -4px;
}
.md-cstep-item.active .md-cstep-dot,
.md-cstep-item.completed .md-cstep-dot {
    background: var(--md-accent);
    border-color: var(--md-accent);
    color: var(--md-off-white);
}
.md-cstep-item.active .md-cstep-label,
.md-cstep-item.completed .md-cstep-label { color: #424242; }
/* Completed connector fully active; the current (active) step's connector is the in-progress split. */
.md-cstep-item.completed::after { background: var(--md-accent); }
.md-cstep-item.active::after { background: linear-gradient(to right, var(--md-accent) 50%, #e2dedc 50%); }

@media (max-width: 881px) {
    /* Keep the current step's label and let it expand; collapse the rest to bunched dots (MD). */
    .md-cstep { padding: 0 25px; }
    .md-cstep-item { flex: 0 0 auto; }
    .md-cstep-item .md-cstep-label { display: none; }
    .md-cstep-item .md-cstep-dot { margin: 0 4px; }
    .md-cstep-item:not(.active)::after { display: none; }
    .md-cstep-item.active { flex: 1 1 auto; min-width: 0; }
    .md-cstep-item.active .md-cstep-label { display: inline-block; }
}
@media (max-width: 554px) { .md-cstep { padding: 0; } }

/* Self-contained MD buttons (the host does not load Bootstrap). Used by the
   vueform nav (FormNavElement) and any Bootstrap-classed buttons in the journey. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 3px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
/* Primary CTA (tax-defense): solid burnt-orange, white bold text, uppercase. */
.btn-primary { background: var(--md-primary); color: #fff; border-color: var(--md-primary); text-transform: uppercase; }
.btn-primary:hover { background: #d1673a; border-color: #d1673a; }
.btn-outline-primary { background: #fff; color: var(--md-primary); border-color: var(--md-primary); }
.btn-outline-primary:hover { background: #fbeae2; }
/* Secondary / Back: dark neutral (matches the journey secondary), white bold text. */
.btn-ghost { background: #424242; color: #fff; border-color: #424242; }
.btn-ghost:hover { background: #333; border-color: #333; }

/* Retrieve-quote page: a standalone Razor form on the branded layout (off-white card, orange focus). */
.md-retrieve { background: var(--md-off-white); border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, .18); max-width: 560px; margin: 0 auto; padding: 32px 40px; color: #212529; }
.md-retrieve-intro { margin: 0 0 24px; color: #5b6169; font-size: 15px; line-height: 1.6; }
.md-retrieve-field { margin-bottom: 18px; }
.md-retrieve-field label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 15px; }
.md-input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid #ced4da; border-radius: 4px; font: inherit; font-size: 15px; background: #fff; box-sizing: border-box; }
.md-input:focus { outline: none; border-color: var(--md-accent); box-shadow: 0 0 0 2px rgba(255, 78, 0, .18); }
.md-retrieve-actions { text-align: right; }
.md-retrieve-submit { margin-top: 8px; }
.md-retrieve-errors { background: #fdecec; border: 1px solid #f5c2c7; border-left: 4px solid #dc3545; border-radius: 6px; padding: 12px 16px; margin-bottom: 20px; color: #842029; font-size: 14px; }
.md-retrieve-errors ul { margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 575px) { .md-retrieve { padding: 24px 20px; } }

/* "Retrieve a quote" header link (visible on all sizes, unlike the desktop-only contact block). */
.md-header-retrieve { color: var(--md-primary); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.md-header-retrieve:hover { text-decoration: underline; }

/* Error pages (404 / 500 / generic) on the lean Markel error layout — centered off-white card. */
.md-error { background: var(--md-off-white); border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, .18); max-width: 620px; margin: 0 auto; padding: 40px 40px 36px; text-align: center; color: #212529; }
.md-error-icon { font-size: 44px; color: var(--md-accent); margin-bottom: 18px; }
.md-error-h { font-size: 1.6rem; font-weight: 600; margin: 0 0 12px; }
.md-error-p { color: #5b6169; font-size: 15px; line-height: 1.6; margin: 0 auto 24px; max-width: 48ch; }
.md-error-p a { color: var(--md-primary); font-weight: 600; }
.md-error-actions { display: flex; justify-content: center; gap: 12px; }
.md-error-ref { margin: 22px 0 0; font-size: 12px; color: #8a9099; }
.md-error-ref code { color: #5b6169; }
@media (max-width: 575px) { .md-error { padding: 28px 20px; } }

/* Inactivity timeout warning (Vue journey layout). */
.md-timeout { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); z-index: 1100; padding: 24px; }
.md-timeout[hidden] { display: none; }
.md-timeout-dialog { background: var(--md-off-white); border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); padding: 28px 32px; max-width: 420px; width: 100%; text-align: center; }
.md-timeout-dialog h2 { margin: 0 0 12px; font-size: 1.5rem; font-weight: 600; color: var(--md-ink); }
.md-timeout-dialog p { margin: 4px 0; color: #5b6169; }
.md-timeout-count { font-size: 2.5rem; font-weight: 700; color: var(--md-primary); margin: 8px 0 12px; }
.md-timeout-dialog .btn { margin-top: 16px; }
.md-timeout-page { text-align: center; }

/* Minimal flex utilities the vendored engine expects from Bootstrap (not loaded here):
   drives the radio/checkbox two-per-row grid and the Back/Next nav spacing. */
.d-flex { display: flex; }
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

/* Footer: matching orange top accent, single centered legal block. */
.md-footer {
    background-color: var(--md-off-white);
    box-shadow: inset 0 4px 0 0 var(--md-accent);
    padding: 40px 16px;
}
.md-footer .md-footer-inner { max-width: 984px; margin: 0 auto; font-size: 12px; color: #5b6169; }
.md-footer .md-footer-links { margin-bottom: 16px; }
.md-footer .md-footer-links a { text-decoration: underline; }
.md-footer .md-footer-links .sep { margin: 0 8px; }

/* Purchase complete ("You're Covered") — MVC page, MD chrome. Two-column card: done message +
   refer-a-friend on the left, policy documents on the right. */
.md-complete {
    display: flex;
    align-items: stretch;
    background: var(--md-off-white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
    overflow: hidden;
}
.md-complete-main { flex: 1; min-width: 0; padding: 32px 40px; }
.md-complete-docs { flex: none; width: 320px; padding: 32px; border-left: 1px solid #d4d8de; }

@media (max-width: 991px) {
    .md-complete { flex-direction: column; }
    .md-complete-docs { width: auto; border-left: 0; border-top: 1px solid #d4d8de; }
}
@media (max-width: 575px) {
    .md-complete-main, .md-complete-docs { padding: 24px 20px; }
}

.md-complete-title {
    margin: 0 0 16px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--md-ink);
}
.md-complete-title--sep { margin-top: 32px; padding-top: 28px; border-top: 1px solid #d4d8de; }
.md-complete-main p { margin: 16px 0; }
.md-complete-list { margin: 0 0 16px; padding-left: 22px; }
.md-complete-list li { margin: 4px 0; }

/* Refer a friend */
.md-raf { margin-top: 8px; }
.md-raf-result { margin-top: 8px; }
.md-raf-label { display: block; font-weight: 600; margin-bottom: 8px; }
.md-raf-linkbox {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border: 1px solid #d4d8de;
    border-radius: 6px;
    flex-wrap: wrap;
}
.md-raf-link {
    flex: 1;
    min-width: 0;
    border: 1px solid #d4d8de;
    border-radius: 4px;
    padding: 8px 10px;
    font: inherit;
    color: var(--md-ink);
    background: #f7f6f2;
}
.md-raf-copy { flex: none; }
.md-raf-share { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.md-raf-share-label { font-weight: 600; margin-right: 4px; }
.md-raf-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background: var(--md-primary);
    color: #fff;
    text-decoration: none;
}
.md-raf-share-btn:hover { background: #d1673a; }
.md-raf-error { margin-top: 12px; color: #842029; font-weight: 600; }

/* Documents list */
.md-doc-list { list-style: none; margin: 0; padding: 0; }
.md-doc-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.md-doc-list li i { color: var(--md-primary); }
.md-doc-list .pdf-ico { flex: none; }
.md-doc-list a { text-decoration: underline; }
