.oa-mc[hidden] {
    display: none !important;
}

.oa-mc,
.oa-mc * {
    box-sizing: border-box;
}

.oa-mc {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #272332;
    font-family: "Open Sans", Arial, sans-serif;
}

.oa-mc__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(25, 20, 36, 0.7);
    backdrop-filter: blur(5px);
}

.oa-mc__dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(24, 17, 42, 0.32);
    outline: 0;
}

.oa-mc__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid #eee9f4;
    background: linear-gradient(135deg, #f8f3ff 0%, #fff 65%);
}

.oa-mc__header h2 {
    margin: 5px 0 0;
    color: #2d2638;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.oa-mc__dev-label {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eee3ff;
    color: #6840a5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1.2;
    text-transform: uppercase;
}

.oa-mc__close {
    width: 38px;
    min-width: 38px;
    height: 38px;
    margin: -4px -6px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5f576b;
    font-size: 32px;
    font-weight: 300;
    line-height: 34px;
    cursor: pointer;
}

.oa-mc__close:hover,
.oa-mc__close:focus {
    background: #f0e9f8;
    color: #3d285b;
    outline: none;
}

.oa-mc__body {
    max-height: calc(100vh - 145px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 28px 28px;
}

.oa-mc__intro {
    margin: 0 0 16px;
    color: #716a7c;
    font-size: 13px;
    line-height: 1.5;
}

.oa-mc__status {
    min-height: 0;
    color: #695675;
    font-size: 14px;
}

.oa-mc.is-busy .oa-mc__status {
    min-height: 42px;
    margin-bottom: 12px;
    padding: 11px 14px 11px 42px;
    border-radius: 12px;
    background: #f7f2fb;
    position: relative;
}

.oa-mc.is-busy .oa-mc__status::before {
    position: absolute;
    top: 12px;
    left: 14px;
    width: 18px;
    height: 18px;
    border: 2px solid #d9cae8;
    border-top-color: #7650a7;
    border-radius: 50%;
    content: "";
    animation: oa-mc-spin 0.8s linear infinite;
}

@keyframes oa-mc-spin {
    to { transform: rotate(360deg); }
}

.oa-mc__error,
.oa-mc__error-static {
    margin: 0 0 16px;
    padding: 11px 14px;
    border: 1px solid #e9b8c2;
    border-radius: 12px;
    background: #fff4f6;
    color: #8a263b;
    font-size: 13px;
    line-height: 1.45;
}

.oa-mc__course {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid #e9e1f1;
    border-radius: 15px;
    background: #fcfaff;
}

.oa-mc__course > div {
    min-width: 0;
}

.oa-mc__course span,
.oa-mc__price span {
    display: block;
    margin-bottom: 3px;
    color: #82798e;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.oa-mc__course strong {
    display: block;
    font-size: 16px;
    line-height: 1.35;
}

.oa-mc__price {
    min-width: 115px !important;
    text-align: right;
}

.oa-mc__price strong {
    color: #674092;
    font-size: 20px;
    white-space: nowrap;
}

.oa-mc__checkout-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.oa-mc__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    color: #3f3948;
    font-size: 13px;
    font-weight: 600;
}

.oa-mc__field--wide,
.oa-mc__signed-in {
    grid-column: 1 / -1;
}

.oa-mc__field input,
.oa-mc__field select {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cdc5d6;
    border-radius: 10px;
    background: #fff;
    color: #2e2935;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.oa-mc__field input:focus,
.oa-mc__field select:focus {
    border-color: #7650a7;
    box-shadow: 0 0 0 3px rgba(118, 80, 167, 0.13);
}

.oa-mc__field input[readonly] {
    background: #f5f2f7;
    color: #6f6878;
}

.oa-mc__field small {
    color: #8c8495;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.oa-mc__text-button {
    align-self: start;
    justify-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 46px;
    margin: 24px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #68409b;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.oa-mc__signed-in {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f0f8f2;
    color: #2f6941;
    font-size: 13px;
}

.oa-mc__login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
    padding: 17px;
    border: 1px solid #ddd1e8;
    border-radius: 14px;
    background: #faf7fc;
}

.oa-mc__login[hidden] {
    display: none;
}

.oa-mc__login h3 {
    grid-column: 1 / -1;
    margin: 0;
    color: #453653;
    font-size: 16px;
}

.oa-mc__phone-login {
    align-self: center;
    color: #68409b;
    font-size: 12px;
}

.oa-mc__coupon {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #ece7f0;
}

.oa-mc__coupon--first {
    margin: 0 0 20px;
    padding: 0 0 18px;
    border-top: 0;
    border-bottom: 1px solid #ece7f0;
}

.oa-mc__coupon-result {
    grid-column: 1 / -1;
    min-height: 0;
    color: #39744a;
    font-size: 12px;
}

.oa-mc__secondary {
    min-height: 46px;
    padding: 9px 16px;
    border: 1px solid #74509f;
    border-radius: 10px;
    background: #fff;
    color: #684092;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.oa-mc__coupon .oa-mc__secondary {
    height: 46px;
}

.oa-mc__secondary:hover,
.oa-mc__secondary:focus {
    background: #f5effa;
    outline: none;
}

.oa-mc__fieldset {
    display: grid;
    gap: 9px;
    margin: 20px 0 0;
    padding: 0;
    border: 0;
}

.oa-mc__fieldset legend {
    margin-bottom: 9px;
    color: #3f3948;
    font-size: 13px;
    font-weight: 700;
}

.oa-mc__payment {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #dcd4e3;
    border-radius: 11px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

.oa-mc__payment:has(input:checked) {
    border-color: #7a55a5;
    background: #faf6ff;
}

.oa-mc__payment input,
.oa-mc__terms input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #70499c;
}

.oa-mc__free-note {
    margin-top: 20px;
    padding: 13px 14px;
    border: 1px solid #b8dec2;
    border-radius: 12px;
    background: #f2fbf4;
    color: #326c41;
    font-size: 13px;
    line-height: 1.45;
}

.oa-mc__business {
    margin: 18px 0 0;
    color: #756e7d;
    font-size: 12px;
    line-height: 1.45;
}

.oa-mc__business a,
.oa-mc__terms a {
    color: #68409b;
}

.oa-mc__terms {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 14px -8px;
    padding: 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #625b6a;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

.oa-mc__terms input {
    margin-top: 1px;
}

.oa-mc__field.oa-mc__invalid input,
.oa-mc__field.oa-mc__invalid select {
    border-color: #cf405b;
    background: #fff6f7;
    box-shadow: 0 0 0 3px rgba(207, 64, 91, 0.12);
}

.oa-mc__terms.oa-mc__invalid,
.oa-mc__fieldset.oa-mc__invalid {
    border: 1px solid #cf405b;
    background: #fff6f7;
}

.oa-mc__invalid {
    animation: oa-mc-shake 0.42s ease-in-out 0s 2;
}

@keyframes oa-mc-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

.oa-base-quick-order {
    min-height: 100vh;
}

.oa-mc__submit {
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, #9256d6, #6159d9);
    box-shadow: 0 10px 24px rgba(103, 74, 176, 0.24);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.oa-mc__submit:hover,
.oa-mc__submit:focus {
    box-shadow: 0 13px 28px rgba(103, 74, 176, 0.32);
    transform: translateY(-1px);
    outline: none;
}

.oa-mc__submit:disabled,
.oa-mc button:disabled,
.oa-mc input:disabled,
.oa-mc select:disabled {
    cursor: wait;
    opacity: 0.62;
}

.oa-mc__dev-note {
    margin: 12px 0 0;
    color: #a199a9;
    font-size: 10px;
    line-height: 1.4;
    text-align: center;
}

@media (max-width: 620px) {
    .oa-mc {
        align-items: flex-end;
        padding: 0;
    }

    .oa-mc__dialog {
        width: 100%;
        max-height: 100dvh;
        border-radius: 20px 20px 0 0;
    }

    .oa-mc__header {
        padding: 18px 18px 14px;
    }

    .oa-mc__header h2 {
        font-size: 21px;
    }

    .oa-mc__body {
        max-height: calc(100dvh - 96px);
        padding: 16px 18px 28px;
    }

    .oa-mc__course {
        align-items: flex-start;
        padding: 14px;
    }

    .oa-mc__course strong {
        font-size: 14px;
    }

    .oa-mc__price {
        min-width: 88px !important;
    }

    .oa-mc__price strong {
        font-size: 17px;
    }

    .oa-mc__checkout-fields,
    .oa-mc__login {
        grid-template-columns: 1fr;
    }

    .oa-mc__field--wide,
    .oa-mc__signed-in,
    .oa-mc__login h3 {
        grid-column: auto;
    }

    .oa-mc__text-button {
        margin-top: 0;
    }

    .oa-mc__coupon {
        grid-template-columns: 1fr;
    }

    .oa-mc__coupon-result {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oa-mc *,
    .oa-mc *::before,
    .oa-mc *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
