@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&display=swap');

.rostms-feedback {
    --rostms-blue: #1237ee;
    --rostms-blue-dark: #0c2398;
    --rostms-blue-pale: #eef2ff;
    --rostms-blue-soft: #f7f8ff;
    --rostms-ink: #111522;
    --rostms-text: #202431;
    --rostms-muted: #6f7686;
    --rostms-line: #e5e8f0;
    --rostms-white: #fff;
    --rostms-error: #c43131;
    --rostms-success: #15803d;
    color: var(--rostms-text);
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.rostms-feedback *,
.rostms-feedback *::before,
.rostms-feedback *::after {
    box-sizing: border-box;
}

.rostms-feedback [hidden] {
    display: none !important;
}

.rostms-feedback-inline .rostms-feedback {
    width: 100%;
    max-width: 680px;
    padding: 36px;
    border: 1px solid var(--rostms-line);
    border-radius: 22px;
    background: var(--rostms-white);
    box-shadow: 0 18px 46px rgba(18, 55, 238, .08);
}

.rostms-feedback__title {
    margin: 0 0 28px;
    color: var(--rostms-ink);
    font-size: clamp(27px, 4vw, 34px);
    font-weight: 600;
    letter-spacing: -.045em;
    line-height: 1.12;
}

.rostms-feedback__fields {
    display: grid;
    gap: 18px;
}

.rostms-feedback__field {
    display: grid;
    gap: 8px;
}

.rostms-feedback__label {
    color: var(--rostms-text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.35;
}

.rostms-feedback__required {
    margin-left: 2px;
    color: var(--rostms-error);
}

.rostms-feedback__input,
.rostms-feedback__textarea,
.rostms-feedback__select,
.rostms-feedback__file {
    width: 100%;
    border: 1px solid var(--rostms-line);
    border-radius: 14px;
    background: var(--rostms-blue-soft);
    color: var(--rostms-ink);
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.rostms-feedback__input,
.rostms-feedback__select,
.rostms-feedback__file {
    min-height: 54px;
    padding: 13px 16px;
}

.rostms-feedback__textarea {
    min-height: 132px;
    padding: 14px 16px;
    line-height: 1.55;
    resize: vertical;
}

.rostms-feedback__input::placeholder,
.rostms-feedback__textarea::placeholder {
    color: #949baa;
    opacity: 1;
}

.rostms-feedback__input:hover,
.rostms-feedback__textarea:hover,
.rostms-feedback__select:hover,
.rostms-feedback__file:hover {
    border-color: #cbd2e2;
    background: var(--rostms-white);
}

.rostms-feedback__input:focus,
.rostms-feedback__textarea:focus,
.rostms-feedback__select:focus,
.rostms-feedback__file:focus-within {
    border-color: var(--rostms-blue);
    background: var(--rostms-white);
    box-shadow: 0 0 0 4px rgba(18, 55, 238, .11);
    outline: none;
}

.rostms-feedback__file {
    padding: 7px;
    color: var(--rostms-muted);
}

.rostms-feedback__file::file-selector-button {
    min-height: 38px;
    margin-right: 12px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--rostms-blue-pale);
    color: var(--rostms-blue);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.rostms-feedback__choices {
    display: grid;
    gap: 10px;
    padding: 2px 0;
}

.rostms-feedback__choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--rostms-text);
    cursor: pointer;
    line-height: 1.45;
}

.rostms-feedback__choice input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--rostms-blue);
}

.rostms-feedback__choice--consent {
    padding: 14px 16px;
    border: 1px solid var(--rostms-line);
    border-radius: 14px;
    background: var(--rostms-blue-soft);
    color: var(--rostms-muted);
    font-size: 13px;
    transition: border-color .2s ease, background-color .2s ease;
}

.rostms-feedback__choice--consent:hover {
    border-color: #cbd2e2;
    background: var(--rostms-white);
}

.rostms-feedback__choice--consent a {
    color: var(--rostms-blue);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(18, 55, 238, .34);
    text-underline-offset: 3px;
    transition: color .2s ease, text-decoration-color .2s ease;
}

.rostms-feedback__choice--consent a:hover {
    color: var(--rostms-blue-dark);
    text-decoration-color: currentColor;
}

.rostms-feedback__choice--consent input:focus-visible {
    outline: 3px solid rgba(18, 55, 238, .18);
    outline-offset: 2px;
}

.rostms-feedback__form.is-validated .rostms-feedback__choice--consent input:required:invalid + span {
    color: var(--rostms-error);
}

.rostms-feedback__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    margin-top: 24px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--rostms-blue);
    color: var(--rostms-white);
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, opacity .22s ease;
}

.rostms-feedback__submit:hover {
    background: var(--rostms-blue-dark);
    box-shadow: 0 14px 28px rgba(18, 55, 238, .26);
    transform: translateY(-2px);
}

.rostms-feedback__submit.is-consent-disabled,
.rostms-feedback__submit.is-consent-disabled:hover {
    background: #a8b4ea;
    color: rgba(255, 255, 255, .86);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.rostms-feedback__submit:focus-visible {
    outline: 3px solid rgba(18, 55, 238, .2);
    outline-offset: 3px;
}

.rostms-feedback__submit[disabled] {
    cursor: wait;
    opacity: .62;
    transform: none;
}

.rostms-feedback__errors {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.rostms-feedback__errors {
    border-color: rgba(196, 49, 49, .16);
    background: #fff4f4;
    color: var(--rostms-error);
}

.rostms-feedback__success[hidden] {
    display: none !important;
}

.rostms-feedback__success {
    display: flex;
    min-height: 390px;
    padding: 38px 20px 24px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    color: var(--rostms-text);
    text-align: center;
    animation: rostmsSuccessFadeIn .42s ease both;
}

.rostms-feedback__success-icon {
    position: relative;
    width: 92px;
    height: 92px;
    margin-bottom: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, #eef2ff, #e2f8eb);
    box-shadow: 0 16px 38px rgba(18, 55, 238, .14);
    animation: rostmsSuccessIconIn .58s cubic-bezier(.2, .85, .25, 1.25) .08s both;
}

.rostms-feedback__success-icon::before {
    position: absolute;
    top: 23px;
    left: 35px;
    width: 20px;
    height: 38px;
    border-right: 5px solid var(--rostms-blue);
    border-bottom: 5px solid var(--rostms-blue);
    content: '';
    transform: rotate(45deg);
    animation: rostmsSuccessCheckIn .4s ease .42s both;
}

.rostms-feedback__success-icon::after {
    position: absolute;
    inset: -9px;
    border: 1px solid rgba(18, 55, 238, .2);
    border-radius: inherit;
    content: '';
    animation: rostmsSuccessPulse 1.8s ease-out .7s infinite;
}

.rostms-feedback__success-title {
    margin-bottom: 12px;
    color: var(--rostms-ink);
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.18;
}

.rostms-feedback__success-message {
    max-width: 410px;
    color: var(--rostms-muted);
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-line;
}

.rostms-feedback__success-close {
    display: inline-flex;
    min-width: 190px;
    min-height: 50px;
    margin-top: 26px;
    padding: 0 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--rostms-blue);
    color: var(--rostms-white);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.rostms-feedback__success-close:hover {
    background: var(--rostms-blue-dark);
    box-shadow: 0 12px 24px rgba(18, 55, 238, .22);
    transform: translateY(-2px);
}

.rostms-feedback__success-close:focus-visible {
    outline: 3px solid rgba(18, 55, 238, .2);
    outline-offset: 3px;
}

.rostms-feedback__success-autoclose {
    margin-top: 14px;
    color: #9299a8;
    font-size: 12px;
}

.rostms-feedback__honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.rostms-feedback-modal {
    position: fixed;
    z-index: 11000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.rostms-feedback-modal.is-open {
    display: flex;
}

.rostms-feedback-modal[hidden] {
    display: none !important;
}

.rostms-feedback-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 17, 32, .68);
    backdrop-filter: blur(5px);
}

.rostms-feedback-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(229, 232, 240, .9);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(13, 17, 32, .28);
    animation: rostmsFeedbackIn .24s ease both;
}

.rostms-feedback-modal__scroll {
    box-sizing: border-box;
    max-height: calc(100vh - 60px);
    margin: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 32px;
    border-radius: 16px;
    scrollbar-color: #aeb5c7 transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.rostms-feedback-modal__scroll::-webkit-scrollbar {
    width: 10px;
}

.rostms-feedback-modal__scroll::-webkit-scrollbar-track {
    margin: 18px 0;
    background: transparent;
}

.rostms-feedback-modal__scroll::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: #aeb5c7;
    background-clip: content-box;
}

.rostms-feedback-modal__scroll::-webkit-scrollbar-thumb:hover {
    background-color: #858da2;
}

.rostms-feedback-modal__dialog .rostms-feedback__title {
    padding-right: 42px;
}

.rostms-feedback-modal__close {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef2ff;
    color: #1237ee;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 27px;
    font-weight: 400;
    line-height: 1;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.rostms-feedback-modal__close:hover {
    background: #1237ee;
    color: #fff;
    transform: rotate(6deg);
}

body.rostms-feedback-modal-open {
    overflow: hidden;
}

@keyframes rostmsFeedbackIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rostmsSuccessFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rostmsSuccessIconIn {
    from { opacity: 0; transform: scale(.55) rotate(-8deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes rostmsSuccessCheckIn {
    from { opacity: 0; transform: rotate(45deg) scale(.4); }
    to { opacity: 1; transform: rotate(45deg) scale(1); }
}

@keyframes rostmsSuccessPulse {
    0% { opacity: .7; transform: scale(.88); }
    75%, 100% { opacity: 0; transform: scale(1.22); }
}

@media (max-width: 600px) {
    .rostms-feedback-inline .rostms-feedback {
        padding: 24px 18px;
        border-radius: 18px;
        box-shadow: 0 12px 34px rgba(18, 55, 238, .07);
    }

    .rostms-feedback__title {
        margin-bottom: 22px;
        font-size: 27px;
    }

    .rostms-feedback__fields {
        gap: 15px;
    }

    .rostms-feedback-modal {
        align-items: flex-end;
        padding: 0;
    }

    .rostms-feedback-modal__dialog {
        width: 100%;
        max-height: 94vh;
        padding: 0;
        border-radius: 24px 24px 0 0;
    }

    .rostms-feedback-modal__scroll {
        max-height: calc(94vh - 8px);
        margin: 4px;
        padding: 26px 14px 20px;
        border-radius: 20px 20px 0 0;
    }

    .rostms-feedback__success {
        min-height: 330px;
        padding: 28px 10px 18px;
    }

    .rostms-feedback__success-icon {
        width: 82px;
        height: 82px;
    }

    .rostms-feedback__success-icon::before {
        top: 19px;
        left: 31px;
    }

    .rostms-feedback-modal__close {
        top: 14px;
        right: 14px;
        width: 38px;
        height: 38px;
    }

    .rostms-feedback__input,
    .rostms-feedback__select,
    .rostms-feedback__file,
    .rostms-feedback__submit {
        min-height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rostms-feedback *,
    .rostms-feedback-modal__dialog,
    .rostms-feedback-modal__close,
    .rostms-feedback__success-icon::before,
    .rostms-feedback__success-icon::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
