.cstm-modal-top-header {
    padding-left: 0 !important;
}

.cstm-modal-top-header .modal-dialog {
    width: calc(100% - 30px);
    max-width: 850px;
    margin: 20px auto;
}

.jd-quote-modal {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow:
        0 35px 90px rgba(3, 24, 59, 0.28),
        0 5px 20px rgba(3, 24, 59, 0.08);
}

/* Bottom brand line */
.jd-quote-modal::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    height: 6px;
    background: linear-gradient(
        90deg,
        #009cd2 0%,
        #0865b9 50%,
        #12a4dc 100%
    );
}

/* Decorative background */
.jd-modal-pattern {
    position: absolute;
    top: -145px;
    right: -135px;
    z-index: 0;
    width: 340px;
    height: 340px;
    border: 54px solid rgba(8, 101, 185, 0.055);
    border-radius: 50%;
    pointer-events: none;
}

.jd-modal-pattern::before,
.jd-modal-pattern::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.jd-modal-pattern::before {
    top: 50px;
    left: -70px;
    width: 85px;
    height: 85px;
    border: 18px solid rgba(18, 164, 220, 0.045);
}

.jd-modal-pattern::after {
    right: 25px;
    bottom: -85px;
    width: 120px;
    height: 120px;
    border: 22px solid rgba(6, 26, 67, 0.035);
}

.jd-modal-body {
    position: relative;
    z-index: 2;
    padding: 38px 42px 40px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.98),
            rgba(245, 250, 255, 0.97)
        );
}

/* Header */
.jd-modal-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 28px;
    padding-right: 52px;
}

.jd-modal-heading {
    max-width: 650px;
}

.jd-modal-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: #0865b9;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.jd-modal-subtitle i {
    font-size: 13px;
}

.jd-modal-heading .modal-title {
    margin: 0 0 9px;
    color: #009cd2;
    font-size: 35px;
    line-height: 1.2;
    font-weight: 800;
}

.jd-modal-heading p {
    max-width: 610px;
    margin: 0;
    color: #68758a;
    font-size: 15px;
    line-height: 1.7;
}

/* Close button */
.jd-modal-close {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    background: linear-gradient(135deg, #009cd2, #009cd2);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(6, 54, 114, 0.22);
    transition:
        transform 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.jd-modal-close:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #0865b9, #12a4dc);
    box-shadow: 0 14px 30px rgba(8, 101, 185, 0.3);
    transform: rotate(90deg);
}

/* Fields */
.jd-form-group {
    margin: 0;
}

.jd-field-label {
    display: block;
    margin-bottom: 7px;
    color: #263750;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
}

.jd-input-box {
    position: relative;
}

.jd-input-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    color: #0865b9;
    font-size: 14px;
    transform: translateY(-50%);
    pointer-events: none;
}

.jd-input-box .form-control {
    width: 100%;
    height: 55px;
    padding: 11px 16px 11px 49px;
    color: #17263d;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d9e5f1;
    border-radius: 11px;
    outline: none;
    box-shadow: 0 7px 20px rgba(8, 50, 100, 0.04);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.jd-input-box .form-control::placeholder {
    color: #929dad;
    opacity: 1;
}

.jd-input-box .form-control:hover {
    border-color: #aac6e2;
}

.jd-input-box .form-control:focus {
    color: #17263d;
    background: #ffffff;
    border-color: #0865b9;
    box-shadow: 0 0 0 4px rgba(8, 101, 185, 0.1);
    transform: translateY(-1px);
}

/* Textarea */
.jd-textarea-box .jd-input-icon {
    top: 18px;
    transform: none;
}

.jd-textarea-box textarea.form-control {
    height: 115px;
    min-height: 115px;
    padding-top: 15px;
    resize: vertical;
}

/* Captcha */
.jd-captcha-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.jd-captcha-input {
    flex: 1;
    min-width: 0;
}

.jd-captcha-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 155px;
    min-width: 155px;
    height: 55px;
    padding: 6px 11px;
    background: #ffffff;
    border: 1px solid #d9e5f1;
    border-radius: 11px;
    box-shadow: 0 7px 20px rgba(8, 50, 100, 0.04);
}

.jd-captcha-image img {
    display: block;
    max-width: 100%;
    max-height: 42px;
    object-fit: contain;
}

/* Submit */
.jd-submit-group {
    margin-top: 3px;
}

.jd-submit-button-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.jd-submit-button {
    min-width: 280px;
    height: 57px;
    padding: 11px 60px 11px 25px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    background: linear-gradient(135deg, #009cd2 0%, #0865b9 100%);
    border: 0;
    border-radius: 11px;
    box-shadow: 0 14px 30px rgba(6, 66, 139, 0.26);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}

.jd-submit-icon {
    position: absolute;
    top: 50%;
    right: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    color: #009cd2;
    background: #ffffff;
    border-radius: 8px;
    transform: translateY(-50%);
    pointer-events: none;
    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

.jd-submit-button-wrap:hover .jd-submit-button {
    background: linear-gradient(135deg, #0865b9, #12a4dc);
    box-shadow: 0 18px 38px rgba(8, 101, 185, 0.34);
    transform: translateY(-3px);
}

.jd-submit-button-wrap:hover .jd-submit-icon {
    color: #0865b9;
    transform: translate(3px, -50%);
}

.jd-privacy-text {
    margin: 12px 0 0;
    color: #7d899a;
    font-size: 12px;
}

.jd-privacy-text i {
    margin-right: 5px;
    color: #0865b9;
}

/* Validation compatibility */
.jd-modern-form label.error {
    display: block;
    margin: 5px 0 0;
    color: #dc3545;
    font-size: 11px;
    font-weight: 600;
}

.jd-modern-form .form-control.error {
    border-color: #dc3545;
}

/* Tablet */
@media (max-width: 991px) {
    .jd-modal-body {
        padding: 32px 30px 35px;
    }

    .jd-modal-heading .modal-title {
        font-size: 31px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .cstm-modal-top-header .modal-dialog {
        width: calc(100% - 20px);
        margin: 10px auto;
    }

    .jd-quote-modal {
        border-radius: 17px;
    }

    .jd-modal-body {
        max-height: calc(100vh - 20px);
        padding: 24px 18px 28px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .jd-modal-header {
        margin-bottom: 22px;
        padding-right: 43px;
    }

    .jd-modal-heading .modal-title {
        font-size: 27px;
    }

    .jd-modal-heading p {
        font-size: 14px;
        line-height: 1.6;
    }

    .jd-modal-subtitle {
        font-size: 11px;
    }

    .jd-modal-close {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .jd-input-box .form-control {
        height: 52px;
        padding-left: 47px;
        font-size: 14px;
        border-radius: 9px;
    }

    .jd-textarea-box textarea.form-control {
        height: 105px;
        min-height: 105px;
    }

    .jd-captcha-row {
        flex-direction: column;
        gap: 10px;
    }

    .jd-captcha-image {
        width: 100%;
        min-width: 100%;
        height: 52px;
    }

    .jd-submit-button-wrap {
        display: flex;
        width: 100%;
    }

    .jd-submit-button {
        width: 100%;
        min-width: 100%;
        height: 55px;
    }

    .jd-privacy-text {
        text-align: center;
    }
}

/* ==================================================
   JD QUOTE MODAL Ã¢â‚¬â€ FINAL CONFLICT-FREE OVERRIDE
   Add this CSS at the END of your stylesheet
================================================== */

/* Modal alignment and width */
.new-cstm-modal-design.cstm-modal-top-header {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.new-cstm-modal-design .modal-dialog {
    width: calc(100% - 30px) !important;
    max-width: 600px !important;
    margin: 30px auto !important;
}

.new-cstm-modal-design .modal-content.jd-quote-modal {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    background: #ffffff !important;
    border: 0 !important;
    border-radius: 20px !important;
    box-shadow: 0 30px 80px rgba(3, 24, 59, 0.28) !important;
}

/* Prevent old modal styles */
.new-cstm-modal-design .modal-body.jd-modal-body,
.new-cstm-modal-design .modal-body.stick_popup {
    position: relative !important;
    max-height: calc(100vh - 60px);
    padding: 25px 30px 25px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(12, 101, 187, 0.10),
            transparent 32%
        ),
        linear-gradient(145deg, #ffffff, #f6faff) !important;
}

/* Bottom brand line */
.new-cstm-modal-design .jd-quote-modal::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    height: 5px;
    background: linear-gradient(
        90deg,
        #009cd2 0%,
        #0865b9 55%,
        #17a3dc 100%
    );
}

/* Header */
.new-cstm-modal-design .jd-modal-header {
    position: relative !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin: 0 0 26px !important;
    padding: 0 52px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.new-cstm-modal-design .jd-modal-heading {
    width: 100%;
    max-width: 650px;
}

/* Quick enquiry label */
.new-cstm-modal-design .jd-modal-subtitle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 9px !important;
    padding: 0 !important;
    color: #0865b9 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    background: transparent !important;
}

/* Fix orange title background inherited from old CSS */
.new-cstm-modal-design .jd-modal-heading .modal-title,
.new-cstm-modal-design .stick_popup .modal-title {
    display: block !important;
    width: auto !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: #009cd2 !important;
    font-size: 34px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    text-align: left !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.new-cstm-modal-design .jd-modal-heading p {
    margin: 0 !important;
    padding: 0 !important;
    color: #66758a !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

/* Close button */
.new-cstm-modal-design .jd-modal-close,
.new-cstm-modal-design .stick_close.jd-modal-close {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #009cd2, #009cd2) !important;
    border: 0 !important;
    border-radius: 11px !important;
    box-shadow: 0 9px 22px rgba(6, 57, 119, 0.24) !important;
    transform: none !important;
    transition: 0.3s ease !important;
}

.new-cstm-modal-design .jd-modal-close:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0865b9, #17a3dc) !important;
    transform: rotate(90deg) !important;
}

/* Reset form margins inherited from theme */
.new-cstm-modal-design .jd-modern-form .row {
    margin-right: -8px !important;
    margin-left: -8px !important;
}

.new-cstm-modal-design .jd-modern-form .row > [class*="col-"] {
    padding-right: 8px !important;
    padding-left: 8px !important;
}

.new-cstm-modal-design .jd-form-group {
    position: relative;
    margin: 0 0 0px !important;
    padding: 0 !important;
}

/* Labels */
.new-cstm-modal-design .jd-field-label {
    display: none !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: #263750 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    text-align: left !important;
    background: transparent !important;
}

/* Input wrapper */
.new-cstm-modal-design .jd-input-box {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

/* Fix icon placement */
.new-cstm-modal-design .jd-input-icon {
    position: absolute !important;
    top: 50% !important;
    left: 17px !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #0865b9 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    display: none !important;
}

/* Main input fix Ã¢â‚¬â€ prevents text/icon overlap */
.new-cstm-modal-design .jd-input-box input.form-control,
.new-cstm-modal-design .jd-input-box textarea.form-control {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    color: #17263d !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: #ffffff !important;
    border: 1px solid #d8e4f0 !important;
    border-radius: 10px !important;
    outline: none !important;
    box-shadow: 0 6px 18px rgba(8, 50, 100, 0.04) !important;
    transition: 0.25s ease !important;
}

/* Separate input rule for proper height and padding */
.new-cstm-modal-design .jd-input-box input.form-control {
    height: 40px !important;
    min-height: 40px !important;
    padding: 10px 16px 10px 16px !important;
    line-height: 32px !important;
}

/* Textarea */
.new-cstm-modal-design .jd-textarea-box .jd-input-icon {
    top: 18px !important;
    transform: none !important;
}

.new-cstm-modal-design .jd-input-box textarea.form-control {
    height: 112px !important;
    min-height: 112px !important;
    padding: 15px 16px 15px 16px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
}

/* Placeholder */
.new-cstm-modal-design .jd-input-box .form-control::placeholder {
    color: #8d98a9 !important;
    opacity: 1 !important;
}

/* Focus */
.new-cstm-modal-design .jd-input-box .form-control:focus {
    color: #17263d !important;
    background: #ffffff !important;
    border-color: #0865b9 !important;
    box-shadow: 0 0 0 4px rgba(8, 101, 185, 0.10) !important;
}

/* Remove any theme pseudo icons inside fields */
.new-cstm-modal-design .jd-input-box::before,
.new-cstm-modal-design .jd-input-box::after,
.new-cstm-modal-design .form-control::before,
.new-cstm-modal-design .form-control::after {
    display: none !important;
}

/* Captcha */
.new-cstm-modal-design .jd-captcha-row {
    display: flex !important;
    align-items: stretch !important;
    gap: 12px !important;
}

.new-cstm-modal-design .jd-captcha-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.new-cstm-modal-design .jd-captcha-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 155px !important;
    min-width: 155px !important;
    height: 54px !important;
    padding: 6px 12px !important;
    background: #ffffff !important;
    border: 1px solid #d8e4f0 !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(8, 50, 100, 0.04) !important;
}

.new-cstm-modal-design .jd-captcha-image img,
.new-cstm-modal-design .jd-captcha-image .capside {
    display: block !important;
    width: auto !important;
    max-width: 130px !important;
    height: auto !important;
    max-height: 40px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
}

/* Submit */
.new-cstm-modal-design .jd-submit-group {
    margin: 2px 0 0 !important;
}

.new-cstm-modal-design .jd-submit-button-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
}

.new-cstm-modal-design .jd-submit-button {
    width: auto !important;
    min-width: 285px !important;
    height: 45px !important;
    margin: 0 !important;
    padding: 10px 60px 10px 24px !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: left !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #009cd2, #009cd2) !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 14px 30px rgba(6, 66, 139, 0.25) !important;
    transition: 0.3s ease !important;
}

.new-cstm-modal-design .jd-submit-icon {
    position: absolute !important;
    top: 50% !important;
    right: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 39px !important;
    height: 39px !important;
    color: #009cd2 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
}

.new-cstm-modal-design .jd-submit-button-wrap:hover .jd-submit-button {
    background: linear-gradient(135deg, #0865b9, #17a3dc) !important;
    box-shadow: 0 18px 38px rgba(8, 101, 185, 0.32) !important;
    transform: translateY(-2px) !important;
}

.new-cstm-modal-design .jd-privacy-text {
    margin: 12px 0 0 !important;
    padding: 0 !important;
    color: #7c899a !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* Validation */
.new-cstm-modal-design .jd-modern-form label.error {
    display: block !important;
    margin: 0px 0 0 !important;
    color: #dc3545 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

.new-cstm-modal-design .jd-modern-form .form-control.error {
    border-color: #dc3545 !important;
}

/* Tablet */
@media (max-width: 991px) {
    .new-cstm-modal-design .modal-dialog {
        width: calc(100% - 24px) !important;
        margin: 12px auto !important;
    }

    .new-cstm-modal-design .modal-body.jd-modal-body,
    .new-cstm-modal-design .modal-body.stick_popup {
        padding: 30px 26px 34px !important;
    }

    .new-cstm-modal-design .jd-modal-heading .modal-title {
        font-size: 30px !important;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .new-cstm-modal-design .modal-dialog {
        width: calc(100% - 16px) !important;
        margin: 8px auto !important;
    }

    .new-cstm-modal-design .modal-content.jd-quote-modal {
        border-radius: 15px !important;
    }

    .new-cstm-modal-design .modal-body.jd-modal-body,
    .new-cstm-modal-design .modal-body.stick_popup {
        max-height: calc(100vh - 16px) !important;
        padding: 22px 16px 26px !important;
    }

    .new-cstm-modal-design .jd-modal-header {
        margin-bottom: 21px !important;
        padding-right: 43px !important;
    }

    .new-cstm-modal-design .jd-modal-heading .modal-title,
    .new-cstm-modal-design .stick_popup .modal-title {
        font-size: 25px !important;
    }

    .new-cstm-modal-design .jd-modal-heading p {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    .new-cstm-modal-design .jd-modal-close {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        border-radius: 9px !important;
    }

    .new-cstm-modal-design .jd-input-box input.form-control {
        height: 40px !important;
        min-height: 40px !important;
        padding-left: 16px !important;
    }

    .new-cstm-modal-design .jd-input-box textarea.form-control {
        height: 102px !important;
        min-height: 102px !important;
        padding-left: 16px !important;
    }

    .new-cstm-modal-design .jd-captcha-row {
        flex-direction: column !important;
        gap: 10px !important;
        display: grid !important;
        grid-template-columns: auto 1fr;
        height: 50px !important;
    }

    .new-cstm-modal-design .jd-captcha-image {
        width: 100% !important;
        min-width: 100% !important;
        height: 51px !important;
    }

    .new-cstm-modal-design .jd-submit-button-wrap {
        display: flex !important;
        width: 100% !important;
    }

    .new-cstm-modal-design .jd-submit-button {
        width: 100% !important;
        min-width: 100% !important;
        height: 45px !important;
    }

    .new-cstm-modal-design .jd-privacy-text {
        text-align: center !important;
    }
}