.checkout-page {
    padding: 48px 0 90px;
    background: linear-gradient(180deg, #f4f8ff 0%, #edf3fb 100%);
    min-height: calc(100vh - 90px);
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
    gap: 32px;
    align-items: start;
}

.checkout-summary,
.checkout-panel {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(10, 46, 104, 0.08);
    padding: 32px;
}

.checkout-kicker {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 107, 53, 0.12);
    color: #ff6b35;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.checkout-summary h1 {
    font-size: 38px;
    color: #123761;
    line-height: 1.1;
    margin-bottom: 14px;
}

.checkout-summary p {
    color: #58708d;
}

.checkout-card {
    margin-top: 28px;
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(0, 102, 204, 0.08);
}

.checkout-card strong {
    display: block;
    color: #123761;
    margin-bottom: 4px;
}

.checkout-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.checkout-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-field-full {
    grid-column: 1 / -1;
}

.checkout-field label {
    font-size: 13px;
    font-weight: 700;
    color: #4a6481;
}

.checkout-hint {
    margin: 0;
    color: #58708d;
    line-height: 1.6;
}

.checkout-consent-field {
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(29, 122, 230, 0.12);
}

.checkout-consent {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin: 0;
    cursor: pointer;
    width: 100%;
}

.checkout-consent-box {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}

.checkout-consent input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
    padding: 0;
    border-radius: 4px;
    border: 1px solid rgba(50, 85, 129, 0.24);
    box-shadow: none;
    background: #fff;
    accent-color: #1d7ae6;
    display: block;
    flex: 0 0 auto;
}

.checkout-consent-text {
    display: block;
    min-width: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #16314f;
    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.checkout-consent-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.checkout-link-button,
.checkout-inline-link {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #1d5fbf;
    line-height: 1.2;
    text-decoration: none;
}

.checkout-link-button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.checkout-link-button:hover,
.checkout-inline-link:hover {
    color: #123761;
}

.terms-dialog {
    width: min(760px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    border: 0;
    padding: 0;
    margin: auto;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(8, 36, 78, 0.26);
    position: fixed;
    inset: 0;
    overflow: hidden;
}

.terms-dialog::backdrop {
    background: rgba(7, 24, 49, 0.58);
    backdrop-filter: blur(4px);
}

.terms-dialog-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: #fff;
}

.terms-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.terms-dialog-header h2 {
    margin: 8px 0 0;
    color: #123761;
    font-size: 28px;
    line-height: 1.2;
}

.terms-dialog-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #edf3fb;
    color: #123761;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.terms-dialog-body {
    max-height: min(70vh, 620px);
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -4px;
}

.terms-dialog-body p {
    margin: 0 0 16px;
    color: #58708d;
    line-height: 1.7;
}

.terms-dialog-body h3 {
    margin: 26px 0 8px;
    color: #123761;
    font-size: 18px;
}

.terms-dialog-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    padding-top: 18px;
    margin-top: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, #ffffff 24px);
}

.terms-dialog-accept {
    min-width: 220px;
}

.checkout-field input,
.checkout-field select {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(50, 85, 129, 0.16);
    border-radius: 14px;
    padding: 0 16px;
    font-size: 15px;
    color: #16314f;
    background: #fff;
}

.checkout-field input:focus,
.checkout-field select:focus {
    outline: none;
    border-color: #1d7ae6;
    box-shadow: 0 0 0 4px rgba(29, 122, 230, 0.12);
}

.checkout-feedback {
    grid-column: 1 / -1;
    min-height: 24px;
    font-weight: 600;
    color: #123761;
}

.checkout-feedback-error {
    color: #b42318;
}

.checkout-feedback-warning {
    color: #9a6700;
}

.checkout-submit {
    grid-column: 1 / -1;
    width: 100%;
}

@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .checkout-form {
        grid-template-columns: 1fr;
    }

    .checkout-summary,
    .checkout-panel {
        padding: 24px;
    }

    .checkout-summary h1 {
        font-size: 30px;
    }

    .terms-dialog-card {
        padding: 22px;
    }

    .terms-dialog-header h2 {
        font-size: 22px;
    }

    .checkout-consent-actions {
        gap: 12px;
    }

    .terms-dialog-footer {
        justify-content: stretch;
    }

    .terms-dialog-accept {
        width: 100%;
        min-width: 0;
    }
}