#helpRequestPopup,
#helpRequestPopup * {
    box-sizing: border-box;
}

#helpRequestPopup {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: 20px;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    visibility: hidden;
    z-index: 99999;
    -webkit-font-smoothing: antialiased;
}

#helpRequestPopup.help-request-popup--visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.help-request-popup__overlay {
    background: rgba(21, 25, 30, 0.68);
    backdrop-filter: blur(3px);
    inset: 0;
    position: absolute;
}

.help-request-popup__dialog {
    background:
        linear-gradient(180deg, rgba(255, 250, 244, 0.92) 0%, #ffffff 28%),
        #ffffff;
    border: 1px solid rgba(238, 147, 25, 0.18);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(22, 26, 32, 0.3);
    color: #20242a;
    max-height: min(90vh, 720px);
    max-width: 540px;
    overflow: hidden;
    padding: 0;
    position: relative;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.24s ease;
    width: 100%;
}

.help-request-popup__dialog::before {
    content: none;
}

.help-request-popup__content {
    max-height: min(90vh, 720px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 36px 38px 34px;
    scrollbar-color: #ee9319 #f3f5f7;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

#helpRequestPopup.help-request-popup--visible .help-request-popup__dialog {
    transform: translateY(0) scale(1);
}

.help-request-popup__content::-webkit-scrollbar {
    width: 10px;
}

.help-request-popup__content::-webkit-scrollbar-track {
    background: #f3f5f7;
    border: 3px solid #ffffff;
    border-radius: 20px;
}

.help-request-popup__content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f6b24a 0%, #ee9319 100%);
    border: 3px solid #ffffff;
    border-radius: 20px;
}

.help-request-popup__content::-webkit-scrollbar-thumb:hover {
    background: #d77f08;
}

.help-request-popup__dialog h2 {
    color: #20242a;
    font-family: inherit;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 42px 12px 0;
}

.help-request-popup__dialog p {
    color: #5d6672;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.help-request-popup__close {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(238, 147, 25, 0.22);
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(22, 26, 32, 0.1);
    color: #ee9319;
    cursor: pointer;
    display: flex;
    font-size: 28px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    padding: 0 0 4px;
    position: absolute;
    right: 20px;
    top: 20px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 36px;
    z-index: 3;
}

.help-request-popup__close:hover,
.help-request-popup__close:focus {
    background: #ee9319;
    border-color: #ee9319;
    box-shadow: 0 10px 24px rgba(238, 147, 25, 0.28);
    color: #ffffff;
    outline: none;
    transform: rotate(90deg);
}

.help-request-popup__form {
    display: grid;
    gap: 16px;
}

.help-request-popup__field {
    display: grid;
    gap: 7px;
}

.help-request-popup__field label {
    color: #2e343c;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.help-request-popup__field span {
    color: #d43f3a;
}

.help-request-popup__field input,
.help-request-popup__field textarea {
    background: #fbfcfd;
    border: 1px solid #d9dee5;
    border-radius: 10px;
    color: #20242a;
    display: block;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    padding: 12px 13px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.help-request-popup__field textarea {
    min-height: 82px;
    resize: vertical;
}

.help-request-popup__field input:focus,
.help-request-popup__field textarea:focus {
    background: #ffffff;
    border-color: #ee9319;
    box-shadow: 0 0 0 3px rgba(238, 147, 25, 0.16);
    outline: none;
}

.help-request-popup__submit {
    background: linear-gradient(135deg, #ee9319 0%, #dd7f07 100%);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(238, 147, 25, 0.24);
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    min-height: 44px;
    padding: 13px 20px;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.help-request-popup__captcha-row {
    align-items: center;
    background: #fffaf4;
    border: 1px solid rgba(238, 147, 25, 0.2);
    border-radius: 10px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(90px, 1fr);
    padding: 10px;
}

.help-request-popup__captcha-question {
    color: #20242a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.help-request-popup__captcha input {
    background: #ffffff;
    min-height: 40px;
    padding: 9px 12px;
}

.help-request-popup__submit:hover,
.help-request-popup__submit:focus {
    box-shadow: 0 14px 28px rgba(238, 147, 25, 0.32);
    outline: none;
    transform: translateY(-1px);
}

.help-request-popup__submit:disabled {
    cursor: wait;
    opacity: 0.7;
}

.help-request-popup__message {
    border-radius: 10px;
    display: none;
    font-size: 14px;
    line-height: 1.45;
    padding: 10px 12px;
}

.help-request-popup__message--error {
    background: #fff2f0;
    border-left: 3px solid #d43f3a;
    color: #9f2a25;
    display: block;
}

.help-request-popup__message--success {
    background: #edf8f1;
    border-left: 3px solid #2f9d58;
    color: #236f3f;
    display: block;
}

body.help-request-popup-open {
    overflow: hidden;
}

@media only screen and (max-width: 600px) {
    #helpRequestPopup {
        align-items: center;
        padding: 12px;
    }

    .help-request-popup__dialog {
        border-radius: 16px;
        max-height: calc(100vh - 24px);
        max-width: 100%;
    }

    .help-request-popup__content {
        max-height: calc(100vh - 24px);
        padding: 30px 18px 24px;
    }

    .help-request-popup__dialog h2 {
        font-size: 22px;
        margin-right: 46px;
    }

    .help-request-popup__dialog p {
        font-size: 14px;
    }

    .help-request-popup__close {
        height: 34px;
        right: 14px;
        top: 14px;
        width: 34px;
    }

    .help-request-popup__captcha-row {
        grid-template-columns: 1fr;
    }
}
