/*
 * Certling Unified quote-flow visual preview.
 *
 * Scope: only <body class="certling-quote-preview"> in ask_quote templates.
 * Source: Certling's Unified Statamic experiment (navy, blue, green, yellow).
 * No change to Symfony forms, pricing logic, uploads, Turbo or payments.
 *
 * Delete the template body class and stylesheet includes to revert.
 */
body.certling-quote-preview {
    --cq-navy: #172f49;
    --cq-ink: #1b2f42;
    --cq-muted: #465969;
    --cq-blue: #005ea5;
    --cq-green: #00703c;
    --cq-green-hover: #005a31;
    --cq-yellow: #ffdd00;
    --cq-gold: #f5ca49;
    --cq-border: #d1dce5;
    --cq-soft: #f3f6f8;
    --bs-primary: #005ea5;
    --bs-success: #00703c;
    --bs-warning: #f5ca49;
    --bs-link-color: #005ea5;
    --bs-link-hover-color: #003e6c;
    --bs-light: #f3f6f8;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.62;
    color: var(--cq-ink);
    background: var(--cq-soft);
}

body.certling-quote-preview h1,
body.certling-quote-preview h2,
body.certling-quote-preview h3,
body.certling-quote-preview h4,
body.certling-quote-preview h5,
body.certling-quote-preview h6,
body.certling-quote-preview .h1,
body.certling-quote-preview .h2,
body.certling-quote-preview .h3,
body.certling-quote-preview .h4,
body.certling-quote-preview .h5,
body.certling-quote-preview .h6 {
    color: var(--cq-ink);
    font-family: inherit;
    font-weight: 600;
    letter-spacing: -.013em;
    line-height: 1.28;
}

body.certling-quote-preview h1,
body.certling-quote-preview .h1 {
    font-size: clamp(1.9rem, 3vw, 2.5rem) !important;
}
body.certling-quote-preview h2,
body.certling-quote-preview .h2 {
    font-size: clamp(1.55rem, 2.4vw, 2rem) !important;
}
body.certling-quote-preview h5,
body.certling-quote-preview .h5 {
    font-size: 1.13rem !important;
}
body.certling-quote-preview p,
body.certling-quote-preview .card-text {
    color: var(--cq-muted);
    line-height: 1.57;
}
body.certling-quote-preview a:not(.btn):not(.step-item-link) {
    color: var(--cq-blue);
    text-underline-offset: 3px;
}
body.certling-quote-preview a:focus-visible,
body.certling-quote-preview button:focus-visible,
body.certling-quote-preview input:focus-visible,
body.certling-quote-preview select:focus-visible,
body.certling-quote-preview textarea:focus-visible {
    outline: 3px solid var(--cq-yellow) !important;
    outline-offset: 2px;
}

/* A consistent site-to-app header. Navigation remains fully functional. */
body.certling-quote-preview nav.navbar.navbar-marketing {
    background: var(--cq-navy) !important;
    border-bottom: 2px solid var(--cq-gold);
    color: #fff !important;
    padding-block: .85rem !important;
}
body.certling-quote-preview nav.navbar .navbar-brand,
body.certling-quote-preview nav.navbar .navbar-brand.text-black-75,
body.certling-quote-preview nav.navbar .navbar-nav .nav-link {
    color: #fff !important;
}
body.certling-quote-preview nav.navbar .navbar-brand svg {
    height: 2.2rem;
}
body.certling-quote-preview nav.navbar .navbar-nav .nav-link:hover {
    color: #ffdf64 !important;
}
body.certling-quote-preview nav.navbar .btn-gold {
    background: var(--cq-gold) !important;
    border-color: var(--cq-gold) !important;
    color: var(--cq-ink) !important;
}

/* Shared outer layout of quote start, page-selection and options screens. */
body.certling-quote-preview #layoutDefault_content main > section.bg-light {
    background: var(--cq-soft) !important;
    padding-top: clamp(2.2rem, 4vw, 3.4rem) !important;
}
body.certling-quote-preview #layoutDefault_content main > section .container.px-5 {
    max-width: 1240px;
    padding-inline: clamp(1rem, 3vw, 2.5rem) !important;
}
body.certling-quote-preview .left-col-sticky {
    top: 1.4rem;
}

/* The existing localized stepper title becomes the small blue eyebrow. */
body.certling-quote-preview .text-xs.text-uppercase-expanded.text-primary {
    margin-bottom: 1.6rem !important;
    text-transform: none !important;
    letter-spacing: .012em !important;
    font-size: .93rem !important;
    line-height: 1.35;
    font-weight: 600 !important;
    color: var(--cq-blue) !important;
}
body.certling-quote-preview .step .step-item .step-item-link {
    color: #526678;
    font-weight: 500;
}
body.certling-quote-preview .step .step-item.active .step-item-link {
    color: var(--cq-navy) !important;
    font-weight: 700;
}
body.certling-quote-preview .step .step-item.active::before,
body.certling-quote-preview .step .step-item.active::after {
    background-color: var(--cq-green);
}

/* Calm factual cards with a navy rule, like the new website form. */
body.certling-quote-preview main .card {
    background: #fff;
    border: 1px solid var(--cq-border) !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 10px rgba(23, 47, 73, .045);
}
body.certling-quote-preview main .card.border-top-lg {
    border-top: 4px solid var(--cq-navy) !important;
}
body.certling-quote-preview main .card .card-body {
    padding: clamp(1.15rem, 2.2vw, 1.7rem);
}
body.certling-quote-preview main .card .card-header {
    background: #fff;
    border-color: var(--cq-border);
    color: var(--cq-ink);
    font-weight: 600;
    padding: 1rem 1.4rem;
}
body.certling-quote-preview main .icon-stack.bg-green-soft {
    background: #edf7f1 !important;
    color: var(--cq-green) !important;
}
body.certling-quote-preview main .icon-stack.text-green svg {
    color: var(--cq-green);
}

/* The real Symfony form stays intact, including validation and file inputs. */
body.certling-quote-preview main form .form-label,
body.certling-quote-preview main form label:not(.btn):not(.list-group-item) {
    font-size: .96rem;
    color: var(--cq-ink);
    font-weight: 600;
    margin-bottom: .4rem;
}
body.certling-quote-preview main form .form-control,
body.certling-quote-preview main form .form-select {
    min-height: 46px;
    border-radius: 3px;
    border: 1.5px solid #879aab;
    background-color: #fff;
    color: var(--cq-ink);
    padding: .65rem .8rem;
    box-shadow: none;
    font-size: 1rem;
}
body.certling-quote-preview main form textarea.form-control {
    min-height: 96px;
}
body.certling-quote-preview main form .form-control:focus,
body.certling-quote-preview main form .form-select:focus {
    border-color: var(--cq-blue);
    box-shadow: none;
}
body.certling-quote-preview main form .form-text,
body.certling-quote-preview main form .small,
body.certling-quote-preview main form small {
    color: var(--cq-muted);
}
body.certling-quote-preview main form .invalid-feedback,
body.certling-quote-preview main form .is-invalid {
    color: #a12323;
}
body.certling-quote-preview main #form-quote input[type="file"] {
    width: 100%;
    border: 1.5px dashed #9db0c2;
    border-radius: 4px;
    background: #f8fbfd;
    padding: 1rem;
    min-height: 90px;
    color: #425668;
    font: inherit;
}
body.certling-quote-preview main #form-quote input[type="file"]::file-selector-button {
    padding: .4rem .7rem;
    margin-right: .75rem;
    border: none;
    border-radius: 3px;
    background: #e7f1fa;
    color: var(--cq-blue);
    font-weight: 600;
    cursor: pointer;
}
body.certling-quote-preview main #form-quote input[type="file"]:hover {
    border-color: var(--cq-blue);
}

/* Additional documents remain managed by the app's Stimulus controller. */
body.certling-quote-preview #form-quote [data-file-inputs-target="addButton"] {
    color: var(--cq-blue) !important;
    border: 1px solid var(--cq-blue) !important;
    border-radius: 3px;
    font-weight: 600;
    background: #fff;
}
body.certling-quote-preview #form-quote [data-file-inputs-target="addButton"]:hover {
    background: #eaf4fc !important;
}

/* Calls to action retain their original submission/payment behaviour. */
body.certling-quote-preview main form button.btn-primary[type="submit"],
body.certling-quote-preview main form button.btn-teal[type="submit"],
body.certling-quote-preview main form button.btn-success[type="submit"],
body.certling-quote-preview main form .btn-primary[type="submit"],
body.certling-quote-preview main form .btn-success[type="submit"] {
    color: #fff !important;
    border: 1px solid var(--cq-green) !important;
    background: var(--cq-green) !important;
    border-radius: 3px !important;
    min-height: 49px;
    padding: .7rem 1.35rem;
    font-weight: 600;
    letter-spacing: 0;
}
body.certling-quote-preview main form button.btn-primary[type="submit"]:hover,
body.certling-quote-preview main form button.btn-success[type="submit"]:hover,
body.certling-quote-preview main form .btn-primary[type="submit"]:hover {
    background: var(--cq-green-hover) !important;
    border-color: var(--cq-green-hover) !important;
}
body.certling-quote-preview main .btn-outline-primary {
    --bs-btn-color: #005ea5;
    --bs-btn-border-color: #005ea5;
    --bs-btn-hover-bg: #eaf4fc;
    --bs-btn-hover-color: #003d70;
    --bs-btn-hover-border-color: #005ea5;
    border-radius: 3px;
}

/* Substeps/extra-service options: keep selection mechanisms visible. */
body.certling-quote-preview #form-options .list-group-item {
    border-color: var(--cq-border);
    background: #fff;
}
body.certling-quote-preview #form-options .list-group-item-action:hover {
    background: #f8fbfd !important;
}
body.certling-quote-preview #form-options .badge.bg-green-soft {
    background: #edf7f1 !important;
    color: var(--cq-green) !important;
}
body.certling-quote-preview #form-options #pricing-block {
    border-top: 4px solid var(--cq-navy) !important;
}
body.certling-quote-preview #form-pages .image-rotate-container {
    background: #fff;
}
body.certling-quote-preview #form-pages .card:has(input[type="checkbox"]:checked) {
    border-color: #00703c !important;
    box-shadow: 0 0 0 1px #00703c !important;
}

/* Match footer without affecting its localized links and legal information. */
body.certling-quote-preview footer.footer-dark {
    background: #020914 !important;
    border-top: 2px solid var(--cq-gold);
    color: #fff;
}

@media (max-width: 767px) {
    body.certling-quote-preview main .card .card-body {
        padding: 1.2rem;
    }
    body.certling-quote-preview #layoutDefault_content main > section .container.px-5 {
        padding-inline: 1rem !important;
    }
    body.certling-quote-preview .text-xs.text-uppercase-expanded.text-primary {
        margin-bottom: 1.2rem !important;
    }
    body.certling-quote-preview .left-col-sticky {
        position: static;
    }
}
