/* ============================================================
   Goodwill Form — стили модального окна формы
   ============================================================ */
.gw-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    background: #002b440d;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.gw-modal-overlay.is-open {
    display: flex;
}
.menu-item-has-children svg.gw-select__arrow {
    margin-left: 0;
}
button#submit-at-modal {
    position: relative;
    display: block;
    z-index: 999999999999999;
    width: 100%;
    color: #002B44;
    background: #8FD400;
    border-radius: 4.1vw;
    font-family: 'altkrupa';
    line-height: 1.14;
    height: 12.56vw;
    font-weight: bold;
    font-size: 4.62vw;
    margin-top: 8.72vw;
    border: none !important;
}
.gw-modal-content {
    position: relative;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    background: transparent;
    border-radius: 20px;
    animation: gwModalIn 0.25s ease-out;
    box-sizing: border-box;
}
@keyframes gwModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.gw-modal-close {
    position: absolute;
    top: 1.2vw;
    right: 14.5vw;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.gw-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
    color: #fff;
}

body.gw-modal-open {
    overflow: hidden;
}

.gw-modal-content .wp-feedback-form-wrapper h2.form-price,
.gw-modal-content .wp-feedback-form-wrapper .form-text {
    display: none;
}
.gw-modal-content .wp-feedback-form-wrapper .form-texts {
    display: block;
    color: #859EAC;
    margin-top: 0;
    margin-bottom: 1.5vw;
    display: none;
}

/* ============================================================
   Кастомный селект (gw-select)
   ============================================================ */
.gw-select {
    position: relative;
    width: 100%;
    user-select: none;
    font-family: 'Roboto', sans-serif;
}

.gw-select__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 12.82vw;
    padding: 0 4vw;
    background: #ffffff;
    border: none;
    border-radius: 4.1vw;
    font-family: 'Roboto', sans-serif;
    font-size: 4vw;
    color: #002B44;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
}
.gw-select__toggle:focus {
    outline: none;
}
.gw-select__arrow {
    flex-shrink: 0;
    margin-left: 2vw;
    transition: transform 0.25s ease;
    color: #879ba7;
    width: 3vw;
    height: auto;
}
.gw-select.is-open .gw-select__arrow {
    transform: rotate(180deg);
}

.gw-select__value {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 4vw;
    color: #879ba7;
    cursor: pointer;
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

.gw-select__list {
    display: none;
    position: absolute;
    top: calc(100% + 11px);
    right: 0;
    left: 0;
    background: #ffffff;
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    max-height: 100vw;
    overflow-y: auto;
    z-index: 100;
    width: 74.3vw;
    border-radius: 5.5vw;
    font-family: 'Roboto', sans-serif;
    border-right: 20px solid transparent;
    scrollbar-color: #ffffff transparent;
    box-sizing: border-box;
    box-shadow: 0 8px 30px rgb(0 43 68 / 15%);
    z-index: 9999;
    background: #ffffffb8;
    background: rgb(255 255 255 / 80%);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.gw-select.is-open .gw-select__list {
    display: block;
}

.gw-select__list::-webkit-scrollbar {
    width: 6px;
}
.gw-select__list::-webkit-scrollbar-track {
    background: transparent;
}
.gw-select__list::-webkit-scrollbar-thumb {
    background: #8FD400;
    border-radius: 10px;
    min-height: 84px;
    transition: background 0.2s;
}
.gw-select__list::-webkit-scrollbar-thumb:hover {
    background: #f0f0f0;
}

.gw-select__list {
    scrollbar-width: thin;
    scrollbar-color: #ffffff transparent;
}

.gw-select__option {
    padding: 3vw 5vw;
    font-size: 4vw;
    color: #002B44;
    cursor: pointer;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.3;
    transition: background 0.15s;
    border-radius: 2vw;
}
.gw-select__option:hover, .gw-select__option.is-highlighted
.gw-select__option.is-selected {
    font-weight: 400;
}

/* ============================================================
   Адаптив под десктоп
   ============================================================ */
@media (min-width: 769px) {
.gw-modal-content {
    margin-top: 20vw;
}
    .gw-select__toggle {
        height: 3vw;
        padding: 0 1.2vw;
        border-radius: 0.8vw;
        font-size: 1vw;
    }
.gw-select__value {
	font-size: 0.8vw;
	letter-spacing: 1px;
}
.gw-select__list {
        width: 100%;
        max-height: 22vw;
        border-radius: 0.8vw;
        padding: 0.4vw 0;
        border-right: none;
        z-index: 9999999;
    }
    .gw-select__option {
        padding: 0.6vw 1.2vw;
        border-radius: 0.4vw;
    font-size: 0.8vw;
    letter-spacing: 1px;
    }
li.gw-select__option:hover {
    background: #eef1f3;
}
    .gw-select__arrow {
        margin-left: 0.5vw;
        width: 0.7vw;
        height: auto;
    }

    /* Внутри модалки убираем лишние отступы */
    .gw-modal-content .wp-feedback-form-wrapper .forma {
        position: relative;
        width: 73%;
        margin: auto;
        left: 0;
        right: 0;
        display: block;
        padding: 2.5vw 4vw 5vw 4vw !important;
        margin-bottom: 16vw;
    }
button#submit-at-modal {
        position: relative;
        display: block;
        z-index: 999999;
        width: 15.8vw;
        color: #002B44;
        background: #8fd400;
        border-radius: 0.8vw;
        font-family: 'altkrupa';
        line-height: 1.14;
        height: 3.56vw;
        font-weight: bold;
        font-size: 1.25vw;
        margin-top: 3.72vw;
        right: 1.2vw;
        top: -4.5vw;
        float: right;
        border: none;
    }
}

@media (max-width: 768px) {
.forma {
    padding: 13.69vw 7.69vw 8.69vw 7.69vw !important;
}	
#forma-modal-inner .validate-input-at.w-50 {
    margin-top: 3.13vw !important;
}
    button.gw-select__toggle {
        position: relative;
        outline: none;
        text-decoration: none;
        text-transform: inherit;
        text-shadow: none;
        font-weight: 400;
        cursor: pointer;
        transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .25s ease;
        padding: 0 12px;
        max-width: 100%;
        width: 100%;
        border: 0;
        border-radius: 16px;
        background-color: #ffffff;
        box-shadow: none;
        color: var(--wd-form-color);
        vertical-align: middle;
        font-size: 15px;
        transition: border-color .5s ease;
        height: 12.82vw;
    }
    .gw-modal-content .wp-feedback-form-wrapper .forma {
        margin: 0;
    }
button.gw-modal-close {
    color: white;
    font-size: 7vw;
    position: absolute;
    padding: 4vw;
}
    .gw-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }
.gw-modal-close {
    top: 5vw;
    right: 5vw;
    width: 32px;
    height: 32px;
    font-size: 22px;
}
    .gw-modal-overlay {
        padding: 10px;
    }
}