@font-face {
    font-family: 'PTRoot';
    src: url('pt-root-ui_vf.woff2') format('woff2'),
    url('pt-root-ui_vf.woff') format('woff'),
    url('pt-root-ui_vf.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PTRoot', Arial, sans-serif;
    background-color: #f4f2f0;
    color: #242424;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-logo {
    width: 70px;
    height: auto;
    margin-bottom: 18px;
}

h1 {
    font-size: 48px;
    font-weight: 500;
    text-align: center;
    color: #242424;
    margin-bottom: 20px;
    line-height: 1.0;
}

.subtitle {
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    color: #242424;
    margin-bottom: 30px;
    line-height: 1.2;
}

.description {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: #5e5e5e;
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.6;
    max-width: 800px;
}

.widget-link {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: #5e5e5e;
    margin-bottom: 20px;
    line-height: 1.6;
}

.widget-link a {
    color: #ff5a11;
    text-decoration: none;
}

.widget-link a:hover {
    text-decoration: underline;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 574px;
    padding: 40px 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pay-form {
    width: 100%;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.field-label {
    font-size: 14px;
    font-weight: 600;
    color: #242424;
}

.field-input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 14px 14px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: #242424;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder {
    color: rgba(36, 36, 36, 0.45);
}

.field-input:focus {
    border-color: rgba(255, 90, 17, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 90, 17, 0.12);
}

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 14px 0 18px;
}

.consent-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #ff5a11;
    flex: 0 0 auto;
}

.consent-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #5e5e5e;
}

.consent-text a {
    color: #ff5a11;
    text-decoration: none;
}

.consent-text a:hover {
    text-decoration: underline;
}

.pay-btn {
    width: 100%;
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: #ff5a11;
    color: #ffffff;
    transition: transform 0.05s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.pay-btn:hover {
    background: #f04f09;
}

.pay-btn:active {
    transform: translateY(1px);
}

.pay-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-error {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #991b1b;
    min-height: 1.5em;
}

.instruction-title {
    font-size: 32px;
    font-weight: 500;
    text-align: center;
    color: #242424;
    margin-bottom: 30px;
    line-height: 1.0;
}

.steps {
    list-style: none;
    counter-reset: step-counter;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    font-size: 18px;
    line-height: 1;
    color: #242424;
    font-weight: 500;
    counter-increment: step-counter;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-item::before {
    content: counter(step-counter) ". ";
    font-weight: 500;
    margin-right: 5px;
    color: #ff5a11;
    flex-shrink: 0;
}

/* Responsive Design */
@media screen and (max-width: 960px) {
    .card {
        max-width: 460px;
        padding: 35px 40px;
    }

    h1 {
        font-size: 38px;
    }

    .subtitle {
        font-size: 20px;
    }

    .instruction-title {
        font-size: 28px;
    }

    .step-item {
        font-size: 17px;
    }
}

@media screen and (max-width: 640px) {
    .container {
        padding: 40px 15px;
    }

    .card {
        max-width: 100%;
        padding: 30px 25px;
    }

    h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 18px;
    }

    .instruction-title {
        font-size: 24px;
    }

    .step-item {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .description,
    .widget-link {
        font-size: 13px;
    }

    .consent-text {
        font-size: 12.5px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 26px;
        margin-bottom: 15px;
    }

    .subtitle {
        font-size: 16px;
    }

    .instruction-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .card {
        padding: 25px 20px;
    }

    .step-item {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .description,
    .widget-link {
        font-size: 12px;
        margin-bottom: 12px;
    }
}
/* ===== Виджет прямой оплаты ===== */

.state-card {
    text-align: center;
}

.state-title {
    font-size: 32px;
    font-weight: 500;
    text-align: center;
    color: #242424;
    margin-bottom: 14px;
    line-height: 1.1;
}

.state-subtitle {
    margin-bottom: 10px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.06);
    color: #242424;
    margin-bottom: 18px;
}

.status-badge.success {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.status-badge.error {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.muted {
    color: #5e5e5e;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
    margin-top: 10px;
}

/* Сводка платежа: сумма, назначение, email */
.summary {
    margin-bottom: 22px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.summary-label {
    font-size: 14px;
    font-weight: 500;
    color: #5e5e5e;
    flex: 0 0 auto;
}

.summary-value {
    font-size: 16px;
    font-weight: 600;
    color: #242424;
    text-align: right;
    word-break: break-word;
    min-width: 0;
}

.summary-amount {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.actions-left {
    justify-content: flex-start;
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    transition: transform 0.05s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: #ff5a11;
    color: #ffffff;
}

.btn-primary:hover {
    background: #f04f09;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: #242424;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.09);
}

/* ===== Генератор ссылок ===== */

.field-hint {
    font-size: 12.5px;
    font-weight: 500;
    color: #5e5e5e;
    line-height: 1.4;
}

.result {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-link {
    resize: vertical;
    line-height: 1.5;
    word-break: break-all;
}

@media screen and (max-width: 480px) {
    .state-title {
        font-size: 26px;
    }

    .summary-amount {
        font-size: 24px;
    }

    .summary-row {
        flex-direction: column;
        gap: 2px;
    }

    .summary-value {
        text-align: left;
    }

    .btn {
        min-width: 100%;
    }
}

/* Атрибут hidden должен побеждать display из классов (.result и т.п.) */
[hidden] {
    display: none !important;
}

/* Сноска внизу карточки, отделённая линией */
.card-footnote {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
}

/* Назначение платежа — длинная фраза: в строку с прижатием вправо
   читается рвано, поэтому раскладываем в столбик по левому краю */
.summary-row-wide {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.summary-row-wide .summary-value {
    text-align: left;
    font-weight: 500;
}

/* ===== Виджет групповой терапии ===== */

.field-hint {
    font-size: 12.5px;
    font-weight: 500;
    color: #5e5e5e;
    line-height: 1.4;
}

.field-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23242424' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
    padding-right: 40px;
}

/* Итоговая сумма — отдельной строкой, крупно */
.total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.total-label {
    font-size: 14px;
    font-weight: 500;
    color: #5e5e5e;
}

.total-value {
    font-size: 28px;
    font-weight: 600;
    color: #242424;
    line-height: 1.2;
    white-space: nowrap;
}

@media screen and (max-width: 480px) {
    .total-value {
        font-size: 24px;
    }
}

/* Баннер тестового режима — должен быть невозможно не заметить */
.test-banner {
    width: 100%;
    max-width: 574px;
    box-sizing: border-box;
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #92400e;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}
