.feedback-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1090;
    font-family: inherit;
    opacity: 0;
    pointer-events: none;
}

.feedback-widget.is-feedback-ready {
    opacity: 1;
    pointer-events: auto;
}

.feedback-widget__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 49px;
    padding: 13px 18px;
    border: 1px solid #ff002a;
    border-radius: 4px;
    background: #ff002a;
    color: #fff;
    cursor: grab;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.feedback-widget__trigger:hover,
.feedback-widget__trigger:focus {
    border-color: #ff002a;
    background: #ff002a;
    color: #fff;
    box-shadow: none;
    outline: none;
}

.feedback-widget.is-feedback-dragging .feedback-widget__trigger {
    cursor: grabbing;
}

.feedback-widget__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .52);
    z-index: 1091;
}

.feedback-widget__panel {
    position: absolute;
    right: 0;
    bottom: 58px;
    width: min(380px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 96px));
    overflow: auto;
    z-index: 1092;
    border: 1px solid #22202c;
    border-radius: 5px;
    background: #111119;
    color: #fff;
    box-shadow: none;
}

.feedback-widget__form {
    display: grid;
    gap: 15px;
    padding: 20px;
}

.feedback-widget__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid #22202c;
    border-radius: 4px;
    background: #161620;
    color: #fff;
}

.feedback-widget__close:hover,
.feedback-widget__close:focus {
    border-color: #ff002a;
    color: #ff002a;
    outline: none;
}

.feedback-widget__head {
    padding-right: 34px;
}

.feedback-widget__head h2 {
    margin: 0;
    color: inherit;
    font-size: 21px;
    line-height: 1.2;
}

.feedback-widget__copy,
.feedback-widget__notice,
.feedback-widget__status {
    margin: 0;
    line-height: 1.45;
}

.feedback-widget__copy {
    color: rgba(255, 255, 255, .6);
}

.feedback-widget__notice {
    padding: 11px 12px;
    border: 1px solid #22202c;
    border-radius: 4px;
    background: #161620;
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
}

.feedback-widget__rating {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.feedback-widget__rating legend,
.feedback-widget__field span {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.feedback-widget__field small {
    color: rgba(255, 255, 255, .5);
    font-weight: 700;
}

.feedback-widget__rating-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.feedback-widget__rating-grid label {
    margin: 0;
}

.feedback-widget__rating-grid input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-widget__rating-grid span {
    display: grid;
    min-height: 40px;
    place-items: center;
    border: 1px solid #22202c;
    border-radius: 4px;
    background: #161620;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.feedback-widget__rating-grid input:checked + span,
.feedback-widget__rating-grid span:hover {
    border-color: #ff002a;
    background: #ff002a;
    color: #fff;
}

.feedback-widget__field {
    display: block;
    margin: 0;
}

.feedback-widget__field input,
.feedback-widget__field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #161620;
    border-radius: 2px;
    background: #161620;
    color: #fff;
    font: inherit;
    line-height: 1.35;
    box-shadow: none;
}

.feedback-widget__field input {
    min-height: 54px;
    padding: 1rem;
}

.feedback-widget__field textarea {
    min-height: 132px;
    padding: 1rem;
    resize: vertical;
}

.feedback-widget__field input::placeholder,
.feedback-widget__field textarea::placeholder {
    color: rgba(255, 255, 255, .42);
}

.feedback-widget__field input:focus,
.feedback-widget__field textarea:focus {
    border-color: #ff002a;
    box-shadow: none;
    outline: none;
}

.feedback-widget__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.feedback-widget__actions {
    display: grid;
    gap: 10px;
}

.feedback-widget__status {
    min-height: 20px;
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
}

.feedback-widget__status.is-error {
    color: #c72f45;
}

.feedback-widget__status.is-success {
    color: #0f8a58;
    font-weight: 800;
}

.feedback-widget__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 49px;
    padding: 13px 36px;
    border: 1px solid #ff002a;
    border-radius: 4px;
    background: #ff002a;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 23px;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.feedback-widget__submit:hover,
.feedback-widget__submit:focus {
    border-color: #ff002a;
    background: #ff002a;
    color: #fff;
    box-shadow: none;
    outline: none;
}

.feedback-widget__submit[disabled] {
    cursor: wait;
    opacity: .68;
}

html.light-mode .feedback-widget__panel,
.light-mode .feedback-widget__panel {
    border-color: #f1f1f1;
    background: #fff;
    color: #252525;
    box-shadow: none;
}

html.light-mode .feedback-widget__copy,
html.light-mode .feedback-widget__notice,
html.light-mode .feedback-widget__status,
.light-mode .feedback-widget__copy,
.light-mode .feedback-widget__notice,
.light-mode .feedback-widget__status {
    color: #555;
}

html.light-mode .feedback-widget__notice,
.light-mode .feedback-widget__notice {
    border-color: #f1f1f1;
    background: #f1f1f1;
}

html.light-mode .feedback-widget__rating legend,
html.light-mode .feedback-widget__field span,
.light-mode .feedback-widget__rating legend,
.light-mode .feedback-widget__field span {
    color: #252525;
}

html.light-mode .feedback-widget__field small,
.light-mode .feedback-widget__field small {
    color: rgba(0, 0, 0, .42);
}

html.light-mode .feedback-widget__close,
.light-mode .feedback-widget__close {
    border-color: #f1f1f1;
    background: #f1f1f1;
    color: #252525;
}

html.light-mode .feedback-widget__close:hover,
html.light-mode .feedback-widget__close:focus,
.light-mode .feedback-widget__close:hover,
.light-mode .feedback-widget__close:focus {
    border-color: #ff002a;
    color: #ff002a;
}

html.light-mode .feedback-widget__rating-grid span,
.light-mode .feedback-widget__rating-grid span {
    border-color: #f1f1f1;
    background: #f1f1f1;
    color: #252525;
}

html.light-mode .feedback-widget__rating-grid input:checked + span,
html.light-mode .feedback-widget__rating-grid span:hover,
.light-mode .feedback-widget__rating-grid input:checked + span,
.light-mode .feedback-widget__rating-grid span:hover {
    border-color: #ff002a;
    background: #ff002a;
    color: #fff;
}

html.light-mode .feedback-widget__field input,
html.light-mode .feedback-widget__field textarea,
.light-mode .feedback-widget__field input,
.light-mode .feedback-widget__field textarea {
    border-color: #f1f1f1;
    background: #f1f1f1;
    color: #000;
}

html.light-mode .feedback-widget__field input::placeholder,
html.light-mode .feedback-widget__field textarea::placeholder,
.light-mode .feedback-widget__field input::placeholder,
.light-mode .feedback-widget__field textarea::placeholder {
    color: rgba(0, 0, 0, .42);
}

@media (max-width: 767.98px) {
    .feedback-widget {
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
    }

    .feedback-widget.is-feedback-positioned {
        right: auto;
        bottom: auto;
    }

    body.guest-site .feedback-widget {
        bottom: calc(10px + env(safe-area-inset-bottom));
    }

    .feedback-widget__trigger {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
        cursor: grab;
        touch-action: none;
        box-shadow: none;
    }

    .feedback-widget__trigger i {
        font-size: 17px;
    }

    .feedback-widget__trigger span {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .feedback-widget__panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(138px + env(safe-area-inset-bottom));
        width: auto;
        max-height: calc(100dvh - 168px);
    }

    body.guest-site .feedback-widget__panel {
        bottom: calc(74px + env(safe-area-inset-bottom));
        max-height: calc(100dvh - 96px);
    }

    .feedback-widget__form {
        padding: 20px;
    }
}
