/*
 * Unified concept: selected content and landing-form detailing.
 * Fourth dev-only option. Legacy CSS and all existing interactive flows remain untouched.
 * These enhancement hooks stay invisible in Current/Sober/Refined.
 */
.certling-design-form-intro,
.certling-design-file-prompt,
.certling-design-price-extra {
    display: none !important;
}

/* Text that is real Statamic content, not pseudo-element text. */
html[data-certling-design="unified"] main .certling-design-eyebrow {
    display: block !important;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: .92rem !important;
    line-height: 1.35 !important;
    letter-spacing: .005em;
    font-weight: 600 !important;
    color: #005ea5 !important;
    margin-top: .15rem !important;
    margin-bottom: .65rem !important;
}
html[data-certling-design="unified"] main .certling-design-eyebrow + h2 {
    margin-top: 0 !important;
    margin-bottom: 1.05rem;
}
html[data-certling-design="unified"] body.certling-homepage main .pricing-card-section + .certling-design-eyebrow {
    margin-top: 0 !important;
}

/* Factual pricing explanation and link appear on all pricing-card pages. */
html[data-certling-design="unified"] .pricing-card-section .certling-design-price-extra {
    display: block !important;
    margin-top: 1.1rem;
}
html[data-certling-design="unified"] .pricing-card-section .certling-design-price-extra p {
    font-size: .95rem !important;
    line-height: 1.55 !important;
    margin: 0 0 .9rem !important;
    color: #445766 !important;
}
html[data-certling-design="unified"] .pricing-card-section .certling-design-price-extra a {
    color: #005ea5 !important;
    font-size: .96rem;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}
html[data-certling-design="unified"] .pricing-card-section .certling-design-price-extra a:hover {
    color: #003d70 !important;
}
html[data-certling-design="unified"] .pricing-card-section .certling-design-price-extra a:focus-visible {
    outline: 3px solid #ffdd00;
    outline-offset: 3px;
}
html[data-certling-design="unified"] .pricing-card-section [data-pricing-average-suffix] {
    display: none !important;
}

/* The same form card and column width wherever the component is included. */
html[data-certling-design="unified"] body .form-wrapper {
    width: 100%;
    max-width: 490px;
}
html[data-certling-design="unified"] body .form-wrapper .card.form {
    width: 100%;
    max-width: 490px;
    border: 1px solid #c5d0d9 !important;
    border-top: 4px solid #172f49 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(25, 47, 69, .045) !important;
}
/* Shared form presentation for Unified mode on every page, with native translations. */
html[data-certling-design="unified"] body .form-wrapper .certling-design-form-intro {
    display: block !important;
    margin-bottom: 1.3rem;
}
html[data-certling-design="unified"] body .form-wrapper:has(.certling-design-form-intro) .certling-design-original-form-intro {
    display: none !important;
}
html[data-certling-design="unified"] body .form-wrapper .certling-design-form-intro .certling-design-eyebrow {
    font-size: .87rem !important;
    margin: 0 0 .6rem !important;
}
html[data-certling-design="unified"] body .form-wrapper .certling-design-form-intro h3 {
    font-size: clamp(1.55rem, 2.2vw, 1.8rem);
    letter-spacing: -.02em;
    line-height: 1.22 !important;
    color: #1b2f42 !important;
    margin: 0 0 .55rem !important;
    font-weight: 600 !important;
}
html[data-certling-design="unified"] body .form-wrapper .certling-design-form-intro p:not(.certling-design-eyebrow) {
    font-size: 1rem;
    line-height: 1.5;
    color: #455868 !important;
    margin: 0 !important;
}
html[data-certling-design="unified"] body .form-wrapper .card.form .card-body {
    padding: clamp(1.5rem, 2.5vw, 2.3rem);
}
html[data-certling-design="unified"] body #quote_new .form-group {
    gap: .52rem;
}
html[data-certling-design="unified"] body #quote_new .form-group label:not(.fancy-file) {
    font-weight: 600;
    color: #223547 !important;
    font-size: .97rem;
}
html[data-certling-design="unified"] body #quote_new input.form-control:not([type="file"]),
html[data-certling-design="unified"] body #quote_new select.form-control {
    border: 2px solid #8596a6;
    min-height: 48px;
    border-radius: 3px;
    padding: .75rem .85rem;
    background-color: #fff;
    color: #1b2f42;
}
html[data-certling-design="unified"] body #quote_new input.form-control:focus-visible,
html[data-certling-design="unified"] body #quote_new select.form-control:focus-visible {
    outline: 3px solid #ffdd00;
    outline-offset: 1px;
    border-color: #172f49;
}

/* The whole surface is the real file input label, with a single visible action.
   The original Select button remains for Current / Sober / Refined modes. */
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
    min-height: 100px !important;
    padding: 0 !important;
    border: 2px dashed #9eafbf !important;
    border-radius: 5px !important;
    background: #f7fafc !important;
    cursor: pointer !important;
    overflow: hidden !important;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader > .certling-design-file-prompt {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .9rem;
    align-items: center;
    width: 100%;
    padding: 1.1rem 1.15rem .9rem;
    color: #233b50 !important;
    min-width: 0;
}
html[data-certling-design="unified"] body #quote_new .certling-design-upload-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 5px;
    background: #e8f2fa;
    color: #005ea5;
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 600;
}
html[data-certling-design="unified"] body #quote_new .certling-design-file-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: .22rem;
    font-size: .88rem;
    color: #526677;
    line-height: 1.45;
}
html[data-certling-design="unified"] body #quote_new .certling-design-file-copy strong {
    color: #005ea5;
    font-size: 1.01rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    line-height: 1.3;
}
/* This intentionally overrides the legacy file selector's button. */
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader > span.btn.btn-default {
    display: none !important;
    visibility: hidden !important;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader > span.file-name {
    display: block !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: .7rem 1.15rem !important;
    border-top: 1px solid #dae3ea;
    background: #fff;
    color: #637587;
    font-size: .86rem !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    max-height: 120px;
    overflow-y: auto;
    text-align: left;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader > span.file-name.has-files {
    color: #214b39;
    background: #f6fbf7;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader > span.file-name.has-files::before {
    content: "✓ Selected: ";
    font-weight: 600;
    color: #00703c;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader .file-name .file {
    display: inline-block;
    margin: 0 .45em .18em 0;
    font-size: inherit;
    overflow-wrap: anywhere;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader .file-name .count {
    display: inline-block;
    white-space: nowrap;
    font-size: .8rem;
    color: #526677;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader:hover {
    border-color: #005ea5 !important;
    background: #f0f7fc !important;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader:focus-within {
    outline: 3px solid #ffdd00;
    outline-offset: 2px;
}

/* CTA remains the real submit button, with the real backend action and validation. */
@layer buttons {
    html[data-certling-design="unified"] body #quote_new button.btn-warning {
        --bg: #00703c;
        --bg-hover: #005b31;
        --bg-active: #004628;
        --fg: #ffffff;
        display: flex !important;
        width: 100% !important;
        min-height: 52px;
        justify-content: center;
        border-radius: 3px !important;
        font-size: 1.04rem !important;
        font-weight: 600 !important;
        letter-spacing: 0;
        background: var(--bg) !important;
        color: #fff !important;
    }
    html[data-certling-design="unified"] body #quote_new button.btn-warning:hover {
        background: var(--bg-hover) !important;
    }
    html[data-certling-design="unified"] body #quote_new button.btn-warning:focus-visible {
        outline: 3px solid #ffdd00;
        outline-offset: 2px;
    }
}
@layer forms {
    html[data-certling-design="unified"] body #quote_new .form-group:has(> button) {
        width: 100% !important;
    }
    html[data-certling-design="unified"] body #quote_new .form-group:has(> button) button {
        width: 100% !important;
        margin-left: 0 !important;
        flex: 1 1 100% !important;
    }
}

/* Do not interfere with scroll-triggered animations or Lottie wrappers. */
@media (max-width: 767px) {
    html[data-certling-design="unified"] body .form-wrapper .card.form .card-body {
        padding: 1.4rem;
    }
    html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader {
        min-height: 95px !important;
    }
    html[data-certling-design="unified"] body #quote_new .certling-design-file-prompt {
        padding: .85rem .9rem !important;
    }
}

/* Genuine drag-over feedback; all files still enter the original form input. */
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader.certling-design-dragging {
    border-color: #005ea5 !important;
    background: #eaf4fc !important;
    outline: 3px solid #ffdd00;
    outline-offset: 2px;
    cursor: copy !important;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader.certling-design-dragging .certling-design-file-copy strong {
    color: #003f71;
}

/* Unified upload refinement: one quiet drop target, icon and cumulative file list.
   Keep the legacy selection control unchanged in Current/Sober/Refined modes. */
.certling-design-upload-selection {
    display: none !important;
}
html[data-certling-design="unified"] body #quote_new .form-group:has(> label.certling-design-uploader) {
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader {
    min-height: 94px !important;
    border: 1.5px dashed #9db0c2 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    background: #f8fbfd !important;
}
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader > .certling-design-file-prompt {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 1rem !important;
    padding: 1.15rem 1.2rem !important;
    align-items: center !important;
}
html[data-certling-design="unified"] body #quote_new .certling-design-upload-symbol {
    width: 44px !important;
    height: 44px !important;
    border-radius: 5px !important;
    background: #e7f1fa !important;
    color: #005ea5 !important;
    font-size: inherit !important;
}
html[data-certling-design="unified"] body #quote_new .certling-design-upload-symbol svg {
    display: block;
    width: 25px;
    height: 25px;
    stroke: currentColor;
}
html[data-certling-design="unified"] body #quote_new .certling-design-file-copy {
    gap: .24rem !important;
    color: #526579;
    font-size: .86rem;
    line-height: 1.42;
}
html[data-certling-design="unified"] body #quote_new .certling-design-file-copy strong {
    color: #005ea5;
    font-size: .98rem !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}
/* Once enhanced JS is mounted, filenames live below the clickable drop target. */
html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader.certling-design-enhanced > .file-name {
    display: none !important;
}
html[data-certling-design="unified"] body #quote_new .certling-design-upload-selection:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: .65rem;
    margin-top: .15rem;
    min-width: 0;
}
html[data-certling-design="unified"] body #quote_new .certling-design-selected-files {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    min-width: 0;
}
html[data-certling-design="unified"] body #quote_new .certling-design-selected-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    padding: .5rem .55rem .5rem .75rem;
    color: #183e2c;
    background: #f3faf6;
    border: 1px solid #d6e9dc;
    border-radius: 4px;
    font-size: .88rem;
    line-height: 1.38;
}
html[data-certling-design="unified"] body #quote_new .certling-design-selected-name {
    min-width: 0;
    overflow-wrap: anywhere;
}
html[data-certling-design="unified"] body #quote_new .certling-design-selected-name::before {
    content: "✓";
    margin-right: .45rem;
    color: #00703c;
    font-weight: 700;
}
html[data-certling-design="unified"] body #quote_new .certling-design-remove-document {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: #516376;
    font: 400 1.45rem/1 Arial, sans-serif;
    cursor: pointer;
}
html[data-certling-design="unified"] body #quote_new .certling-design-remove-document:hover {
    background: #e0ebe4;
    color: #203d2d;
}
html[data-certling-design="unified"] body #quote_new .certling-design-add-documents {
    align-self: flex-start;
    display: inline-flex;
    gap: .4rem;
    align-items: center;
    min-height: 36px;
    padding: .32rem .42rem;
    border: none;
    border-radius: 3px;
    background: transparent;
    color: #005ea5;
    font: 600 .91rem/1.4 Arial, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
html[data-certling-design="unified"] body #quote_new .certling-design-add-documents:hover {
    color: #003e6d;
    background: #eff6fb;
}
html[data-certling-design="unified"] body #quote_new .certling-design-add-documents > span {
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 400;
}
html[data-certling-design="unified"] body #quote_new .certling-design-remove-document:focus-visible,
html[data-certling-design="unified"] body #quote_new .certling-design-add-documents:focus-visible {
    outline: 3px solid #ffdd00;
    outline-offset: 2px;
}
@media (max-width: 480px) {
    html[data-certling-design="unified"] body #quote_new label.fancy-file.certling-design-uploader > .certling-design-file-prompt {
        grid-template-columns: 38px minmax(0, 1fr) !important;
        gap: .7rem !important;
        padding: .85rem .8rem !important;
    }
    html[data-certling-design="unified"] body #quote_new .certling-design-upload-symbol {
        width: 38px !important;
        height: 38px !important;
    }
}

/* Bard's Small Blue Section Title is an editorial option, not a hardcoded
   homepage element: render it consistently on any page, in any dev theme. */
html body main p.certling-design-eyebrow {
    display: block !important;
    font: 600 .92rem/1.35 Arial, "Helvetica Neue", Helvetica, sans-serif !important;
    color: #005ea5 !important;
    letter-spacing: .005em;
    margin: .15rem 0 .7rem !important;
}
html body main p.certling-design-eyebrow + h2,
html body main p.certling-design-eyebrow + h3 {
    margin-top: 0 !important;
}
