body .f-html {
    padding: 0 !important;
    background: transparent !important;
}

body .fancybox__backdrop {
    background: var(--bivb-color-overlay) !important;
}

.bivb-popup-inline {
    display: none;
}

.bivb-popup {
    width: min(100%, var(--bivb-popup-width, 490px));
    position: relative;
    padding: 44px 42px 40px;
    border-radius: var(--bivb-radius-6);
    background: var(--bivb-color-surface);
    overflow: hidden;
    box-sizing: border-box;
}

.bivb-popup--wide {
    --bivb-popup-width: 536px;
}

.bivb-popup--narrow {
    --bivb-popup-width: 490px;
}

.bivb-popup__close {
    width: 43px;
    height: 43px;
    top: 10px;
    right: 22px;
    border: 0;
    padding: 0;
    position: absolute;
    border-radius: var(--bivb-radius-full);
    background: var(--bivb-color-surface-elevated);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.bivb-popup__close:hover {
    transform: translateY(-1px);
    background: var(--bivb-color-border-muted);
}

.bivb-popup__close:focus-visible {
    outline: 2px solid var(--bivb-color-primary);
    outline-offset: 2px;
}

.bivb-popup__close img {
    width: 13px;
    height: 13px;
    display: block;
    object-fit: contain;
}

.bivb-popup__content {
    display: flex;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.bivb-popup__title {
    margin: 0;
    color: var(--bivb-color-black-soft);
    font-family: var(--bivb-font-family-base-stack);
    font-size: 24px;
    font-weight: var(--bivb-font-weight-semibold);
    line-height: 1.2;
}

.f-html > .bivb-popup-inline {
    display: block !important;
}

.fancybox__container.is-compact .bivb-popup {
    padding-left: 24px;
    padding-right: 24px;
}


/*RESPONSIVE*/

/* Team contact variants (Figma: 2470:40144 and 3065:19507). */
.bivb-popup--team {
    --bivb-popup-width: 370px;
    width: min(calc(100vw - 30px), var(--bivb-popup-width));
    padding: 0;
    border-radius: var(--bivb-radius-6);
}

.bivb-popup--team-phone {
    width: min(calc(100vw - 30px), 490px);
    height: 220px;
    padding: 43px;
}

.bivb-popup--team-message {
    min-height: 496px;
}

.bivb-popup__team-header {
    display: flex;
    min-height: 80px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    box-sizing: border-box;
    background: var(--bivb-color-surface-muted);
    border-bottom: 0;
}

.bivb-popup--team .bivb-popup__title {
    min-width: 0;
    flex: 1;
    color: var(--bivb-color-black);
    font-size: 23px;
    line-height: normal;
    text-align: left;
}

.bivb-popup--team .bivb-popup__close {
    position: static;
    width: 47px;
    height: 47px;
    flex: 0 0 47px;
}

.bivb-popup--team .bivb-popup__close img {
    width: 15px;
    height: 15px;
}

.bivb-popup__content--team {
    display: flex;
    min-height: 0;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
    text-align: left;
}

.bivb-popup--team-phone .bivb-popup__content--team {
    min-height: 0;
    align-items: flex-start;
    justify-content: center;
    padding: 27px 0 0;
}

.bivb-popup--team-phone .bivb-popup__team-header {
    min-height: 0;
    padding: 0 0 22px;
    background: transparent;
    border-bottom: 1px solid var(--bivb-color-border-light);
}

.bivb-popup--team-phone .bivb-popup__title {
    width: 100%;
    justify-content: center;
    font-size: 24px;
    text-align: center;
}

.bivb-popup--team-phone .bivb-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 43px;
    height: 43px;
    flex-basis: 43px;
}

.bivb-popup__phone-link {
    width: 177px;
    justify-content: center;
}

.bivb-popup__phone-link img {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.bivb-popup--team-message .bivb-popup__content--team,
.bivb-popup--team-message .bivb-team-form,
.bivb-popup--team-message .forminator-ui {
    width: 100%;
}

.bivb-popup__unavailable {
    margin: 0;
    color: var(--bivb-color-text-muted);
    font-family: var(--bivb-font-family-base-stack);
    font-size: 15px;
}

.fancybox__container.is-compact .bivb-popup--team,
body .fancybox__container .bivb-popup--team-message {
    padding: 0;
}

body .fancybox__container .bivb-popup--team-phone {
    width: min(calc(100vw - 30px), 490px) !important;
    height: 220px !important;
    padding: 43px !important;
}

/* Forminator's member select opens an absolutely positioned dropdown. The
 * popup itself used to clip it with overflow:hidden and the dropdown could
 * then fall behind the modal content. Keep this change scoped to the member
 * popup only; the general contact form keeps the default popup behavior. */
body .fancybox__container .bivb-popup--team-message,
body .fancybox__container .bivb-popup--team-message .bivb-popup__content--team,
body .fancybox__container .bivb-popup--team-message .bivb-team-form,
body .fancybox__container .bivb-popup--team-message .forminator-ui,
body .fancybox__container .bivb-popup--team-message .forminator-row,
body .fancybox__container .bivb-popup--team-message .forminator-field {
    overflow: visible;
}

body .fancybox__container .bivb-popup--team-message .forminator-select.forminator-select-dropdown-container--open,
body .fancybox__container .bivb-popup--team-message .forminator-select-dropdown-container--open,
body .fancybox__container .bivb-popup--team-message .forminator-select-dropdown,
body .fancybox__container .bivb-popup--team-message .select2-container--open {
    z-index: 100000 !important;
}

/* Team message modal: exact layout from Figma node 2470:40077. */
body .fancybox__container .bivb-popup--team-message {
    width: min(calc(100vw - 30px), 490px) !important;
    height: 429px !important;
    min-height: 429px !important;
    max-height: calc(100vh - 30px) !important;
    padding: 0 !important;
    border-radius: 6px !important;
    overflow: visible !important;
}

body .fancybox__container .bivb-popup--team-message .bivb-popup__team-header {
    position: relative;
    display: block;
    width: 100%;
    height: 0;
    min-height: 0;
    padding: 0;
    background: transparent;
}

body .fancybox__container .bivb-popup--team-message .bivb-popup__title {
    position: absolute;
    top: 33px;
    left: 45px;
    display: flex;
    width: 403px;
    height: 28px;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--bivb-color-black) !important;
    font-family: var(--bivb-font-family-base-stack) !important;
    font-size: 24px !important;
    font-weight: var(--bivb-font-weight-semibold) !important;
    line-height: 28px !important;
    text-align: center;
    white-space: nowrap;
}

body .fancybox__container .bivb-popup--team-message .bivb-popup__close {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    display: inline-flex;
    width: 43px;
    height: 43px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e3e3e3;
}

body .fancybox__container .bivb-popup--team-message .bivb-popup__close img {
    width: 13px;
    height: 13px;
}

body .fancybox__container .bivb-popup--team-message .bivb-popup__content--team {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    text-align: left;
}

body .fancybox__container .bivb-popup--team-message .bivb-team-form {
    --bivb-field-min-height: 38px;
    --bivb-field-line-height: 18px;
    --bivb-field-textarea-min-height: 147px;

    position: absolute;
    top: 77px;
    left: 45px;
    width: 403px !important;
    margin: 0 !important;
}

body .fancybox__container .bivb-popup--team-message .bivb-team-form .forminator-ui,
body .fancybox__container .bivb-popup--team-message .bivb-team-form .forminator-ui.forminator-custom-form {
    position: static;
    width: 100% !important;
    margin: 0 !important;
}

body .fancybox__container .bivb-popup--team-message .forminator-row {
    width: 100% !important;
    margin: 0 !important;
}

body .fancybox__container .bivb-popup--team-message .forminator-row .forminator-col {
    width: 100% !important;
    padding: 0 !important;
}

body .fancybox__container .bivb-popup--team-message .forminator-row:has(.forminator-field-select) {
    height: 63px;
}

body .fancybox__container .bivb-popup--team-message .forminator-row:has(.forminator-field-textarea) {
    height: 172px;
    margin-top: 12px !important;
}

body .fancybox__container .bivb-popup--team-message .forminator-field-select,
body .fancybox__container .bivb-popup--team-message .forminator-field-textarea {
    margin: 0 !important;
}

body .fancybox__container .bivb-popup--team-message select.forminator-select--field {
    -webkit-appearance: none !important;
    appearance: none !important;
    opacity: 0 !important;
}

body .fancybox__container .bivb-popup--team-message .select2-container.forminator-select,
body .fancybox__container .bivb-popup--team-message .forminator-select2 + .forminator-select {
    width: 403px !important;
    height: 38px !important;
}

body .fancybox__container .bivb-popup--team-message .select2-container.forminator-select .select2-selection,
body .fancybox__container .bivb-popup--team-message .forminator-select2 + .forminator-select .select2-selection {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
}

body .fancybox__container .bivb-popup--team-message textarea.forminator-textarea {
    width: 403px !important;
    height: 147px !important;
    min-height: 147px !important;
    margin: 0 !important;
    resize: none;
}

body .fancybox__container .bivb-popup--team-message .forminator-row-last {
    width: 100% !important;
    height: 55px;
    margin-top: 20px !important;
}

body .fancybox__container .bivb-popup--team-message .forminator-row-last .forminator-col,
body .fancybox__container .bivb-popup--team-message .forminator-row-last .forminator-field {
    width: 100% !important;
    height: 55px;
}

body .fancybox__container .bivb-popup--team-message .forminator-button-submit {
    width: 100% !important;
    height: 55px !important;
    min-height: 55px !important;
}

/* Forminator adds a response block before the fields after a successful AJAX
 * submit. Keep that state inside the fixed Figma modal instead of allowing
 * the old field layout and submit button to overflow below it. */
body .fancybox__container .bivb-popup--team-message .bivb-team-form:has(.forminator-response-message.forminator-success) .forminator-row {
    display: none !important;
}

body .fancybox__container .bivb-popup--team-message .bivb-team-form:has(.forminator-response-message.forminator-success) .forminator-response-message {
    position: absolute;
    top: 0;
    left: 0;
    display: block !important;
    width: 403px !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 15px 20px 15px 22px !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--bivb-color-text) !important;
    background: #bceee6 !important;
    box-shadow: inset 2px 0 0 0 #067963 !important;
    font-family: var(--bivb-font-family-base-stack) !important;
    font-size: 15px !important;
    font-weight: var(--bivb-font-weight-regular) !important;
    line-height: 1.3em !important;
    text-align: left !important;
}

body .fancybox__container .bivb-popup--team-message .bivb-team-form:has(.forminator-response-message.forminator-success) .forminator-response-message p {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font: inherit !important;
    line-height: 1.3em !important;
}

body .fancybox__container .bivb-popup--team-message a.forminator-edit-form,
body .fancybox__container .bivb-popup--team-message a[href*="forminator"] {
    display: none !important;
}

@media (max-width: 520px) {
    body .fancybox__container .bivb-popup--team-message .bivb-popup__title,
    body .fancybox__container .bivb-popup--team-message .bivb-team-form {
        left: 25px;
        width: calc(100% - 50px) !important;
    }

    body .fancybox__container .bivb-popup--team-message .bivb-popup__title {
        font-size: 20px !important;
    }

    body .fancybox__container .bivb-popup--team-message .select2-container.forminator-select,
    body .fancybox__container .bivb-popup--team-message .forminator-select2 + .forminator-select,
    body .fancybox__container .bivb-popup--team-message textarea.forminator-textarea {
        width: 100% !important;
    }

    body .fancybox__container .bivb-popup--team-message .forminator-row-last,
    body .fancybox__container .bivb-popup--team-message .forminator-row-last .forminator-col,
    body .fancybox__container .bivb-popup--team-message .forminator-row-last .forminator-field,
    body .fancybox__container .bivb-popup--team-message .forminator-button-submit {
        width: 100% !important;
    }
}

/* Forminator appends the active Select2 dropdown to <body>, outside the
 * Fancybox slide. The JS moves it into the native dialog; these rules keep
 * the moved dropdown above the slide and allow it to escape its containers. */
body .fancybox__dialog:has(.bivb-popup--team-message),
body .fancybox__dialog:has(.bivb-popup--team-message) .fancybox__container,
body .fancybox__dialog:has(.bivb-popup--team-message) .fancybox__carousel,
body .fancybox__dialog:has(.bivb-popup--team-message) .fancybox__viewport {
    overflow: visible;
}

body .fancybox__dialog:has(.bivb-popup--team-message) > .select2-container.forminator-select-dropdown-container--open,
body .fancybox__dialog:has(.bivb-popup--team-message) > .forminator-select-dropdown-container--open {
    position: absolute !important;
    z-index: 1000000 !important;
}

body:has(.fancybox__container .bivb-popup--team-message) > .select2-container.forminator-select-dropdown-container--open,
body:has(.fancybox__container .bivb-popup--team-message) > .forminator-select-dropdown-container--open {
    position: absolute !important;
    z-index: 1000000 !important;
}

@media (prefers-reduced-motion: reduce) {
    .bivb-popup,
    .bivb-popup__close,
    .fancybox__container,
    .fancybox__backdrop {
        animation: none !important;
        transition: none !important;
    }
}

/*phone*/
@media (max-width: 767px) {

    .bivb-popup {
        padding: 2rem 1.5rem 1.5rem;
    }

    .bivb-popup__close {
        width: 36px;
        right: 10px;
        height: 36px;
    }

}

/*tablet*/
@media (min-width: 768px) and (max-width: 1023px) {

}

/*mobile and tablet*/
@media (max-width: 1023px) {

}

/*desktop*/
@media (min-width: 1025px) {

}

/*laptop 1*/
@media (min-width: 1024px) and (max-width: 1439px) {

}

/*laptop 2*/
@media (min-width: 1440px) and (max-width: 1700px) {

}

/*RESPONSIVE*/
