.gift_form_popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Изменено с center на flex-start, чтобы форма начиналась сверху */
    z-index: 9999;
    overflow-y: auto; /* Включаем прокрутку для всей попап-области */
}

.gift_link {
    display: flex;
    flex-direction: row;
    gap: 25px;
}

.gift_title {
    font-size: 52px;
    text-transform: uppercase;
    font-weight: 900;
    color: #0243ff;
    line-height: normal;
}

.gift_text {
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 900;
    line-height: normal;
}

.gift_form_button_show {
    padding: 20px;
    color: #000000;
    background-color: #ffffff;
    line-height: normal;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    font-family: 'muller', sans-serif !important;
}

.gift_form_button_show:hover {
    background: #1026A9;
}

.gift_form_popup_content {
    width: 100%;
    background: #000000;
    margin: 0 auto;
    color: white;
    max-width: 768px;
    min-height: 100vh;
    overflow-y: auto;
}

.gift_form_popup_close {;
    font-size: 32px;
    cursor: pointer;
    text-align: end;
}

.gift_form_row {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.gift_form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 25px;
    width: 100%;
    font-size: 16px;
    font-weight: 400;
    box-sizing: border-box;
    background: #000000;
    color: #ffffff;
    outline: none;
    text-align: center;
    padding: 40px;
    max-width: 768px;
    margin: 0 auto;
}

.gift_form_label {
    font-weight: bold;
}

.gift_form_input,
.gift_form_select,
.gift_form_textarea,
.gift_form_file {
    width: 100%;
    border: 1px solid #ffffff;
    padding: 20px;
    font-size: 16px;
    line-height: 16.8px;
    text-align: left;
    box-sizing: border-box;
    background: #000000;
    color: #ffffff;
    outline: none;
    text-transform: uppercase;
    font-weight: 900;
}

.gift_form_select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #000 98%/cover no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGBAMAAAAI3hL1AAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMA5QbIxM7W39LaDAqencsvmDEAAAArSURBVAgdY7ipwMA0hyGviEH9GQPHw9VyDQwMcYJPGRgYmN8ZMACBCwMDALSnCHB8NAFdAAAAAElFTkSuQmCC);
    background-size: 12px;

}

.gift_form_button {
    background: #ffffff;
    color: #000000;
    padding: 20px;
    border: none;
    cursor: pointer;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.gift_form_button:hover {
    background: #dfdfdf;
}

.gift_form_success {
    color: green;
    font-weight: bold;
    margin: 15px 0;
    text-transform: uppercase;
}

.gift_form_error {
    color: red;
    font-weight: bold;
    margin: 15px 0;
    text-transform: uppercase;
}

@media (max-width: 1024px) {
    .gift_form_button_show {
        font-size: 16px !important;
    }
}

@media (max-width: 575px) {

    .gift_form {
        gap: 15px;
        padding: 15px;
    }
    .gift_link {
        flex-direction: column;
        gap: 15px;
    }

    .gift_title {
        font-size: 32px;
    }

    .gift_text {
        font-size: 16px;
    }

    .gift_form_input, .gift_form_select, .gift_form_textarea, .gift_form_file {
        padding: 15px;
    }

    .gift_form_button {
        padding: 15px;
    }
}