.oe-text-popup[hidden] {
    display: none !important;
}

.oe-text-popup {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: start center;
    padding: 100px 24px 24px;
    background: transparent;
    opacity: 0;
    transition: opacity 180ms ease;
}

.oe-text-popup.is-open {
    opacity: 1;
}

.oe-text-popup__dialog {
    position: relative;
    width: min(640px, 100%);
    min-height: 504px;
    max-height: calc(100vh - 124px);
    max-height: calc(100dvh - 124px);
    overflow-y: auto;
    padding: 56px 30px 36px;
    border-radius: 20px;
    background: #fff !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    transition: opacity 220ms ease, transform 220ms ease;
}

.oe-text-popup.is-open .oe-text-popup__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#oe-text-popup .oe-text-popup__close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: grid;
    width: 35px !important;
    height: 35px !important;
    place-items: center;
    padding: 0 !important;
    border: 2px solid #4dc2ed !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #4dc2ed !important;
    box-shadow: none !important;
    font: 400 22px/1 'caros', sans-serif !important;
    cursor: pointer;
    transition: all .3s ease-in-out;
}

#oe-text-popup .oe-text-popup__close:hover,
#oe-text-popup .oe-text-popup__close:focus-visible {
    background: #4dc2ed !important;
    color: #fff !important;
    transform: rotate(360deg);
}

.oe-text-popup__close:focus-visible,
.oe-text-popup__dialog:focus-visible {
    outline: 3px solid rgba(39, 58, 136, 0.35);
    outline-offset: 3px;
}

.oe-text-popup__screen-reader {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

#textPopup .gform_heading {
    display: none;
}

#textPopup .gform_wrapper {
    margin: 0;
}

#textPopup .gform_fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
    margin: 0;
}

#textPopup .gform_fields > .gfield.gfield--width-half {
    grid-column: span 1 !important;
}

#textPopup .gform_fields > .gfield.gfield--width-full {
    grid-column: 1 / -1 !important;
}

#textPopup .gfield_label {
    margin-bottom: 8px;
    color: #7a7a7a;
    font-family: 'caros', sans-serif;
    font-size: 16px;
    font-weight: 500;
}

#textPopup .gfield_required {
    color: #ed3c28;
}

#textPopup input[type='text'],
#textPopup input[type='tel'],
#textPopup textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #4dc2ed;
    border-radius: 0;
    background: #fff;
    color: #273a88;
    font-family: 'caros', sans-serif;
    font-size: 14px;
}

#textPopup textarea {
    min-height: 96px;
    resize: vertical;
}

#textPopup .ginput_container_radio {
    margin-top: 0;
}

#textPopup .gfield_radio {
    margin: 0;
}

#textPopup .gfield_radio label {
    color: #777;
    font-family: 'caros', sans-serif;
    font-size: 10px;
    line-height: 1.2;
}

#textPopup input[type='submit'] {
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 5px;
    background: #4dc2ed;
    color: #fff;
    font-family: 'caros', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

#textPopup input[type='submit']:hover {
    background: #273a88;
    transform: translateY(-1px);
}

#textPopup .gform_validation_errors,
#textPopup .gfield_validation_message,
#textPopup .validation_message {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    font-size: 13px;
}

#textPopup .gfield.gfield_error input[type='text'],
#textPopup .gfield.gfield_error input[type='tel'],
#textPopup .gfield.gfield_error textarea {
    border: 1px solid #d63638 !important;
    background-color: #fffafa !important;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.12) !important;
}

#textPopup .gfield.gfield_error input[type='radio'] {
    outline: 2px solid #d63638;
    outline-offset: 2px;
}

#textPopup .gform_footer {
    margin: 12px 0 0;
    padding: 0;
}

#oe-text-popup #textPopup input#gform_submit_button_51 {
    display: inline-flex;
    min-width: 124px !important;
    min-height: 46px !important;
    align-items: center;
    justify-content: center;
    padding: 12px 26px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: #4dc2ed !important;
    color: #fff !important;
    font-family: 'caros', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

#oe-text-popup #textPopup input#gform_submit_button_51:hover,
#oe-text-popup #textPopup input#gform_submit_button_51:focus-visible {
    background: #273a88 !important;
    transform: translateY(-1px);
}

.oe-text-popup__message {
    color: #273a88;
    font-family: 'caros', sans-serif;
}

html.oe-text-popup-open,
body.oe-text-popup-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}
div#textPopup button#gform_submit_button_51 {
    padding: 12px 20px;
    font-weight: 700;
    letter-spacing: .5px;
    font-size: 16px;
}

@media (max-width: 600px) {
    .oe-text-popup {
        padding: 12px;
        place-items: center;
    }

    .oe-text-popup__dialog {
        width: 100%;
        min-height: 0;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 58px 20px 26px;
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #textPopup .gform_fields {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #textPopup .gform_fields > .gfield {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oe-text-popup,
    .oe-text-popup__dialog,
    .oe-text-popup__close,
    #textPopup input[type='submit'] {
        transition-duration: 0.01ms;
    }
}
