/* Overlay */
.checkout {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.checkout__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* Modal */
.checkout__modal {
    position: relative;
    width: 670px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 48px 40px 40px;
    border: 1px solid #b3b3b3;
    border-radius: 30px;
    background: #fff;
    z-index: 1;
}

/* Close */
.checkout__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
}

.checkout__close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 2px;
    background: #000;
    border-radius: 2px;
}

.checkout__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.checkout__close span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Title */
.checkout__title {
    font-weight: 500;
    font-size: 35px;
    text-align: center;
    color: #000;
    margin: 0 0 12px;
}

.checkout__subtitle {
    font-weight: 400;
    font-size: 24px;
    text-align: center;
    color: rgba(0, 0, 0, 0.54);
    margin: 0 0 50px;
}

.checkout__hint {
    font-weight: 500;
    font-size: 21px;
    text-align: center;
    color: #191919;
    margin: 0 0 24px;
}

/* Form */
.checkout__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout__input {
    width: 100%;
    padding: 18px 24px;
    border: 1px solid #d0d0d0;
    border-radius: 42px;
    font-size: 16px;
    color: #000;
    outline: none;
    transition: border-color 0.2s;
    max-width: 467px;
    margin: 0 auto;
    text-align: center;
}

.checkout__input:focus {
    border-color: #a1171b;
}

.checkout__input.is-error {
    border-color: #ed3953;
}

.checkout__input--code {
    max-width: 320px;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.18em;
}

.checkout__step--email-code .checkout__subtitle {
    margin-bottom: 32px;
}

.checkout__step--email-code .checkout__form {
    align-items: center;
}

.checkout__resend,
.checkout__back-link {
    width: fit-content;
    margin: 0 auto;
    color: #a1171b;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.checkout__resend:disabled,
.checkout__back-link:disabled {
    cursor: not-allowed;
    color: #8d8d8d;
    opacity: 0.75;
}

.checkout__verification-note {
    max-width: 480px;
    margin: 24px auto 0;
    color: #666;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

/* Agree */
.checkout__agree {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #191919;
    padding: 8px 0;
    justify-content: center;
}

.checkout__agree-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout__agree-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #b3b3b3;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
}

.checkout__agree-circle::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #ed3953;
    transform: scale(0);
    transition: transform 0.2s;
}

.checkout__agree-input:checked + .checkout__agree-circle {
    border-color: #ed3953;
}

.checkout__agree-input:checked + .checkout__agree-circle::after {
    transform: scale(1);
}

/* Summary */
.checkout__summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 0;
    font-size: 18px;
    color: #191919;
    text-align: center;
}

.checkout__summary--center {
    text-align: center;
}

.checkout__summary-line {
    font-weight: 400;
}

/* Buttons */
.checkout__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 263px;
    height: 61px;
    padding: 8px 26px 8px 25px;
    border-radius: 45px;
    border: 1px solid #fff;
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.25);
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    max-width: 346px;
    margin: 0 auto;
}

.checkout__btn--next,
.checkout__btn--back {
    background: #bebebe;
    color: #000;
}

.checkout__btn--next:not(:disabled) {
    background: linear-gradient(90deg, #ed3953 0%, #a1171b 100%);
    color: #fff;
}

.checkout__btn--next:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Step 1 — кнопка по центру */
.checkout__step > .checkout__form > .checkout__btn--next {
    margin: 20px auto 0;
    display: block;
}

/* Step 2 — pay methods */
.checkout__pay-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.checkout__btn--pay {
    width: 100%;
    background: #fff;
    color: #000;
    border: 1px solid transparent;
    height: 99px;
    border-radius: 52px;
    font-size: 21px;
}

.checkout__btn--pay.is-active {
    background: linear-gradient(90deg, #ed3953 0%, #a1171b 100%);
    color: #fff;
    border-color: transparent;
}

/* Step 2 — actions */
.checkout__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}

.checkout__actions .checkout__btn {
    width: 263px;
}

/* Step 3 — success */
.checkout__step--success {
    text-align: center;
    padding: 50px 0;
}

.checkout__success-text {
    font-weight: 400;
    font-size: 20px;
    text-align: center;
    color: #000;
    margin: 0 0 50px;
}

.checkout__divider {
    border: none;
    border-top: 1px solid #c0c0c0;
    width: 542px;
    max-width: 100%;
    margin: 0 auto 50px;
}

.checkout__event-name {
    font-weight: 400;
    font-size: 24px;
    text-align: center;
    color: rgba(0, 0, 0, 0.54);
    margin: 0 0 30px;
}

.checkout__seats {
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: 16px;
    background: #f8f8f8;
    font-size: 15px;
    color: #191919;
}

.checkout__seats-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.checkout__seats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkout__seat {
    font-size: 15px;
}

/* Mobile */
@media (max-width: 900px) {
    .checkout__modal {
        padding: 40px 20px 24px;
        border-radius: 20px;
    }

    .checkout__title {
        font-size: 24px;
    }

    .checkout__subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .checkout__hint {
        font-size: 17px;
    }

    .checkout__btn,
    .checkout__actions .checkout__btn {
        width: 100%;
    }

    .checkout__actions {
        flex-direction: column;
    }
}
