/* Get Quote modal - redesign */
.quotes-fm .modal-dialog {
    max-width: 480px;
}

.quotes-fm .modal-content {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(20, 40, 80, 0.25);
}

.quotes-fm .modal-header {
    background: linear-gradient(135deg, #21549e 0%, #17a9d0 100%);
    padding: 18px 22px;
    border-bottom: 0;
}

.quotes-fm .modal-header .modal-title {
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    margin: 0;
}

.quotes-fm .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.85;
}

.quotes-fm .modal-header .btn-close:hover {
    opacity: 1;
}

.quotes-fm .whatsapp-qr {
    background: #f6f9fc;
    margin: 0;
    padding: 14px 22px !important;
    border-bottom: 1px solid #e7edf3;
}

.quotes-fm .whatsapp-qr p {
    font-size: 13px !important;
    padding-bottom: 8px !important;
}

.quotes-fm .whatsapp-qr img {
    max-width: 110px !important;
}

.quotes-fm .modal-body {
    padding: 22px;
}

.quotes-fm .mb-3 {
    margin-bottom: 12px !important;
}

.quotes-fm .col-form-label,
.quotes-fm .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #213c75;
    margin-bottom: 5px;
    padding: 0;
}

.quotes-fm .quote_input,
.quotes-fm select.form-control.cont {
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
    background-color: #fbfcfe;
}

.quotes-fm .quote_input:focus,
.quotes-fm select.form-control.cont:focus {
    border-color: #21549e;
    box-shadow: 0 0 0 3px rgba(33, 84, 158, 0.12);
    background-color: #fff;
    outline: none;
}

.quotes-fm textarea.quote_input {
    min-height: 90px;
    resize: vertical;
}

.quotes-fm .errormesssage {
    display: inline-block;
    color: #fff;
    background-color: #dc3545;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

.quotes-fm .errormesssage:empty {
    display: none;
    padding: 0;
    margin: 0;
}

.quotes-fm .modal_input .input-group {
    gap: 8px;
}

.quotes-fm .modal_input .input-group .cont {
    border-radius: 8px !important;
}

.quotes-fm .modal-footer {
    padding: 10px 22px 18px;
    border-top: 0;
}

.quotes-fm .quote_button {
    width: 100%;
    background: linear-gradient(135deg, #21549e 0%, #17a9d0 100%);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.quotes-fm .quote_button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(33, 84, 158, 0.3);
}

.quotes-fm .quote_button:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Product autocomplete suggestions */
.quotes-fm .quote-product-wrap {
    position: relative;
}

.quotes-fm .quote-product-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid #d8e1ec;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(20, 40, 80, 0.1);
    display: none;
}

.quotes-fm .quote-product-suggestions.show {
    display: block;
}

.quotes-fm .quote-product-suggestions li {
    list-style: none;
    padding: 9px 12px;
    font-size: 13px;
    color: #213c75;
    cursor: pointer;
    border-bottom: 1px solid #f0f3f8;
}

.quotes-fm .quote-product-suggestions li:last-child {
    border-bottom: 0;
}

.quotes-fm .quote-product-suggestions li:hover,
.quotes-fm .quote-product-suggestions li.active {
    background: #eef4fb;
}

/* Full-page success / error overlay - sits above the entire page, not just the modal box */
.quote-result-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 30, 55, 0.55);
    padding: 24px;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.quote-result-overlay.show {
    display: flex;
}

.quote-result-msg {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(20, 40, 80, 0.3);
    animation: quoteResultIn .4s cubic-bezier(.22, 1, .36, 1);
}

/* Error state: simple centered layout (no banner/summary card) */
.quote-result-msg.error {
    padding: 44px 30px 40px;
    text-align: center;
}

.quote-result-msg.error > .quote-result-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fdecea 0%, #fbdedb 100%);
}

.quote-result-msg.error > .quote-result-icon svg {
    width: 30px;
    height: 30px;
    stroke: #dc3545;
}

.quote-result-msg.error > .quote-result-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #b02a37;
    margin-bottom: 8px;
}

.quote-result-msg.error > .quote-result-text {
    display: block;
    font-size: 14px;
    line-height: 1.55;
    color: #5a6677;
}

.quote-result-msg.error .quote-result-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 22px;
    padding: 10px 26px;
    border-radius: 8px;
    border: 1px solid #d8e1ec;
    background: #fff;
    color: #21549e;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.quote-result-msg.error .quote-result-close:hover {
    background: #f4f8fc;
    border-color: #21549e;
}

.quote-result-banner {
    position: relative;
    background: linear-gradient(135deg, #21549e 0%, #17a9d0 100%);
    padding: 22px 24px 30px;
    text-align: left;
}

.quote-result-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.quote-result-brand-mark {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .4px;
}

.quote-result-brand-mark img {
    height: 22px;
    width: auto;
    filter: brightness(0) invert(1);
}

.quote-result-eyebrow {
    color: rgba(255, 255, 255, .7);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.quote-result-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
}

.quote-result-icon svg {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 1;
    stroke: #fff;
}

.quote-result-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    animation: quoteRingPulse 1.6s ease-out 1;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
}

.quote-result-pill {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .3);
}

.quote-result-body {
    background: #fff;
    padding: 28px 28px 26px;
    text-align: center;
}

.quote-result-title {
    display: block;
    font-size: 21px;
    font-weight: 700;
    color: #213c75;
    letter-spacing: -.3px;
    margin-bottom: 4px;
}

.quote-result-subtitle {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #17a9d0;
    margin-bottom: 12px;
}

.quote-result-text {
    display: block;
    font-size: 13.5px;
    line-height: 1.6;
    font-weight: 400;
    color: #67758a;
    max-width: 360px;
    margin: 0 auto 20px;
}

.quote-result-summary {
    text-align: left;
    background: #f3f6fa;
    border: 1px solid #e6ecf3;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 22px;
}

.quote-result-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #8491a3;
    margin-bottom: 8px;
}

.quote-result-summary-head svg {
    width: 16px;
    height: 16px;
    stroke: #21549e;
}

.quote-result-product {
    font-size: 15px;
    font-weight: 700;
    color: #213c75;
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e0e6ee;
    word-break: break-word;
}

.quote-result-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #3c4858;
    padding: 3px 0;
}

.quote-result-step svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: #198754;
}

.quote-result-close {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 0;
    border-radius: 9px;
    border: 0;
    background: linear-gradient(135deg, #21549e 0%, #17a9d0 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.quote-result-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(33, 84, 158, 0.3);
}

.quote-result-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #a6b1c0;
}

@keyframes quoteResultIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes quoteRingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    100% {
        box-shadow: 0 0 0 16px rgba(255, 255, 255, 0);
    }
}

@media only screen and (max-width: 576px) {
    .quotes-fm .modal-dialog {
        margin: 10px;
    }

    .quotes-fm .modal-body {
        padding: 18px;
    }

    .quotes-fm .modal-header {
        padding: 16px 18px;
    }

    .quote-result-overlay {
        padding: 14px;
    }

    .quote-result-banner {
        padding: 18px 18px 24px;
    }

    .quote-result-body {
        padding: 22px 20px 20px;
    }
}
