/* Consult popup form + fixed call button */

/* --- fixed call button --- */
.consult-call-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 64px;
    height: 64px;
    z-index: 900;
    display: block;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(13, 58, 96, 0.25);
    transition: transform .2s ease;
}
.consult-call-btn img {
    width: 100%;
    height: 100%;
    display: block;
}
.consult-call-btn .consult-call-btn__hover {
    display: none;
}
.consult-call-btn:hover {
    transform: scale(1.05);
}
.consult-call-btn:hover .consult-call-btn__default {
    display: none;
}
.consult-call-btn:hover .consult-call-btn__hover {
    display: block;
}

/* --- modal: bottom sheet, slides up from the bottom edge --- */
@keyframes consultSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.consult-modal.modal {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border-radius: 28px 28px 0 0;
    overflow: hidden;
    animation: consultSlideUp .45s ease;
    box-shadow: none;
}
/* no page dimming behind the consult popup (per design) */
.jquery-modal.blocker:has(> #consult-popup),
.jquery-modal.blocker:has(> #consult-success) {
    background: transparent;
}
.consult-modal__inner {
    display: flex;
    align-items: stretch;
    min-height: 75vh;
    max-height: 90vh;
}
.consult-modal__image {
    flex: 1 1 52%;
    background: url('../image/consult_form/bg-desktop.png') left center / cover no-repeat;
}
.consult-modal__content {
    flex: 1 1 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px 60px 20px;
    overflow-y: auto;
}
.consult-modal__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 28px;
    line-height: 36px;
    color: #0D3A60;
    margin: 0 0 16px;
    text-align: left;
    max-width: 420px;
}
.consult-modal__subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #0D3A60;
    margin: 0 0 30px;
    max-width: 420px;
    text-align: left;
}
.consult-modal__form {
    display: flex;
    flex-direction: column;
    max-width: 420px;
}
.consult-modal__box {
    position: relative;
    margin-bottom: 16px;
}
.consult-modal__box svg,
.consult-modal__box .consult-modal__icon {
    position: absolute;
    left: 22px;
    top: 26px; /* anchored to the input (52px high), not the box — error text below must not shift it */
    transform: translateY(-50%);
    pointer-events: none;
    width: 18px;
    height: auto;
}
.consult-modal__box input {
    width: 100%;
    height: 52px;
    padding: 0 20px 0 56px;
    border: 1px solid #DEDEDE;
    border-radius: 28px;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 15px;
    color: #0D3A60;
    background: #fff;
}
.consult-modal__box input::placeholder {
    color: #0D3A60;
    opacity: 1;
}
.consult-modal__box input {
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.consult-modal__box input:focus {
    border-color: #0D3A60;
    background: #EDF8FF;
    box-shadow: 0 0 0 3px rgba(13, 58, 96, 0.08);
}
.consult-modal__box.has-error input {
    border-color: #E05B4B;
    background: #FFF7F6;
}
.consult-modal__box.has-error input:focus {
    box-shadow: 0 0 0 3px rgba(224, 91, 75, 0.10);
}
.consult-modal__btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
    height: 52px;
    background: #B5944F;
    border-radius: 28px;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 15px;
    letter-spacing: 0;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .2s ease;
}
.consult-modal__btn {
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.consult-modal__btn:hover,
.consult-modal__btn:focus {
    background: #a3854a;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(181, 148, 79, 0.35);
    transform: translateY(-1px);
}
.consult-modal__btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(181, 148, 79, 0.25);
}
.consult-modal.modal a.close-modal {
    background-image: url('../image/consult_form/icons/icon-close-desk.svg');
    top: 35px !important;
    right: 35px !important;
    width: 42px;
    height: 42px;
    background-size: 42px;
}
@keyframes consultErrorIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.consult-modal .form-input-error {
    color: #E05B4B;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    line-height: 16px;
    margin: 7px 0 0 24px;
    animation: consultErrorIn .25s ease;
}

/* --- success bottom sheet --- */
#consult-success.modal {
    box-shadow: none;
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 70px 30px;
    border-radius: 28px 28px 0 0;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #0D3A60;
    animation: consultSlideUp .45s ease;
}
#consult-success.modal a.close-modal {
    background-image: url('../image/icon-close.svg');
    top: 25px;
    right: 30px;
    width: 20px;
    height: 20px;
    background-size: 20px;
}

/* --- mobile --- */
@media (max-width: 900px) {
    .consult-modal__inner {
        flex-direction: column;
        min-height: 0;
        max-height: 92vh;
    }
    /* photo on top, title overlaps its white-faded bottom part */
    .consult-modal__image {
        flex: none;
        height: 0;
        padding-bottom: 52.8%; /* 689x364 image ratio */
        background: url('../image/consult_form/bg-mobile.png') center top / cover no-repeat;
    }
    .consult-modal__content {
        padding: 0 20px 30px;
        margin-top: -56px; /* pull title onto the faded bottom of the photo */
        overflow-y: visible;
    }
    .consult-modal__title {
        font-size: 20px;
        line-height: 25px;
        margin-bottom: 12px;
    }
    .consult-modal__subtitle {
        font-size: 12px;
        line-height: 16px;
        margin-bottom: 20px;
    }
    .consult-modal__form {
        max-width: none;
    }
    .consult-modal__box {
        margin-bottom: 14px;
    }
    .consult-modal__box input {
        height: 56px;
        /* 16px minimum: iOS Safari auto-zooms the page when focusing inputs with smaller font */
        font-size: 16px;
        line-height: 20px;
        border-radius: 28px;
        padding-left: 62px;
    }
    .consult-modal__box svg,
    .consult-modal__box .consult-modal__icon {
        left: 24px;
        top: 28px; /* half of the 56px input */
        width: 22px;
        height: auto;
    }
    .consult-modal__btn {
        height: 56px;
        border-radius: 28px;
        margin-top: 8px;
    }
    .consult-modal.modal a.close-modal {
        background-image: url('../image/consult_form/icons/icon-close-mob.svg');
        top: 25px !important;
        right: 25px !important;
        width: 14px;
        height: 14px;
        background-size: 14px;
    }
    .consult-call-btn {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
    }
}
