.rfi-form {
    --rfi-accent: #38bdf8;
    --rfi-ink: #07061a;
    --rfi-panel: #0B7;
    --rfi-slate: #008253;
    --rfi-text: #475569;
    --rfi-heading: #07061a;
    --rfi-line: #d5dbe5;
    max-width: 860px;
    color: var(--rfi-text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 600;
}

body.rfi-popup-is-open {
    overflow: hidden;
}

.rfi-popup-trigger,
.rfi-form__button {
    border: 0;
    border-radius: 7px;
    background: linear-gradient(135deg, #0B7, #008253);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    box-shadow: 0 5px 16px rgba(7, 6, 26, 0.22);
}

.rfi-popup-trigger {
    padding: 12px 16px;
}

.rfi-popup[hidden],
.rfi-form [hidden] {
    display: none !important;
}

.rfi-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 20px;
}

.rfi-popup__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(7, 6, 26, 0.88), rgba(30, 41, 59, 0.82));
    backdrop-filter: blur(4px);
}

.rfi-popup__dialog {
    position: relative;
    width: min(780px, 100%);
    max-height: min(88vh, 720px);
    overflow: auto;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 24px 28px 26px;
    box-shadow: 0 28px 80px rgba(7, 6, 26, 0.42);
}

.rfi-popup__dialog .rfi-form {
    max-width: none;
}

.rfi-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 50%;
    background: #07061a;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    padding: 0;
    box-shadow: 0 8px 22px rgba(7, 6, 26, 0.22);
}

.rfi-popup__close:hover,
.rfi-popup__close:focus {
    background: #16213e;
    color: #38bdf8;
}

.rfi-popup__header {
    margin: 0 46px 20px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e7ebf1;
}

.rfi-popup__eyebrow {
    margin: 0 0 5px;
    color: #16213e;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.rfi-popup__title {
    margin: 0;
    color: var(--rfi-heading);
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
}

.rfi-form__notice {
    margin-bottom: 18px;
    padding: 10px 12px;
    border-left: 4px solid var(--rfi-accent);
    background: #f0f9ff;
}

.rfi-form__notice--error {
    border-left-color: #b45309;
    background: #fff7ed;
}

.rfi-form__step {
    display: none;
}

.rfi-form__step.is-active {
    display: block;
}

.rfi-form__label {
    margin-bottom: 8px;
    color: var(--rfi-heading);
}

.rfi-form__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
}

.rfi-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 30px;
    color: var(--rfi-text);
    cursor: pointer;
}

.rfi-check input {
    appearance: none;
    width: 19px;
    height: 19px;
    margin: 0;
    border: 2px solid #b7bac0;
    border-radius: 0;
    background: #fff;
    display: grid;
    place-content: center;
}

.rfi-check input:checked {
    border-color: #38bdf8;
    background: #16213e;
}

.rfi-check input:checked::before {
    content: "";
    width: 9px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.rfi-form__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
}

.rfi-form__fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--rfi-text);
}

.rfi-form__fields input,
.rfi-form__fields textarea {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--rfi-line);
    border-radius: 0;
    background: transparent;
    color: #333;
    font: inherit;
    font-weight: 400;
    line-height: 1.5;
    outline: none;
    padding: 1px 0 5px;
}

.rfi-form__fields input:focus,
.rfi-form__fields textarea:focus {
    border-bottom-color: #38bdf8;
}

.rfi-form__textarea {
    grid-column: 1 / -1;
}

.rfi-form__actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.rfi-form__button {
    min-width: 104px;
    padding: 10px 20px;
}

.rfi-form__button--secondary {
    background: #64748b;
    box-shadow: none;
}

.rfi-form__error {
    outline: 2px solid rgba(180, 83, 9, 0.28);
    outline-offset: 4px;
}

.rfi-thank-you {
    max-width: 720px;
    margin: 50px auto;
    padding: 46px 30px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 18px 50px rgba(7, 6, 26, 0.1);
    color: #4f5560;
    font-family: Inter, Arial, Helvetica, sans-serif;
    text-align: center;
}

.rfi-thank-you__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16213e, #1e293b);
    color: #fff;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.rfi-thank-you__title {
    margin: 0 0 10px;
    color: #151922;
    font-size: 34px;
    line-height: 1.18;
    font-weight: 800;
}

.rfi-thank-you__message {
    max-width: 540px;
    margin: 0 auto;
    color: #6b7280;
    font-size: 17px;
    line-height: 1.6;
}

@media (max-width: 720px) {
    .rfi-popup {
        padding: 12px;
    }

    .rfi-popup__dialog {
        padding: 22px 18px;
    }

    .rfi-popup__title {
        font-size: 22px;
    }

    .rfi-form__split,
    .rfi-form__fields {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .rfi-thank-you {
        margin: 28px auto;
        padding: 34px 20px;
    }

    .rfi-thank-you__title {
        font-size: 28px;
    }
}
