/* THE SKILL Payment Page - точная копия стиля основного сайта theskill.pro */

@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;600;700&display=swap');

:root {
    /* Цвета бренда из theskill.pro */
    --brand-red: #EE2A12;
    --brand-red-hover: #D61F0A;
    --brand-blue: #2900FF;
    --brand-blue-hover: #2000CC;
    --brand-yellow: #FED87A;

    /* Фоновые цвета */
    --bg-white: #FFFFFF;
    --bg-light: #F6F6F6;
    --bg-dark: #000000;

    /* Текст */
    --text-primary: #35383F;
    --text-heading: #000000;
    --text-muted: #7C7C7C;
    --text-white: #FFFFFF;

    /* Границы */
    --border-light: #E6E6E6;
    --border-medium: #C5C5C5;
    --border-dark: #35383F;

    /* Пастельные цвета карточек */
    --card-yellow: #FFD89E;
    --card-purple: #C8B4FF;
    --card-pink: #FFCDDC;
    --card-blue: #A8D5FF;
    --card-green: #B4EECA;

    /* Статусы */
    --success: #62C584;
    --error: #F95D51;

    /* Скругления - как на основном сайте */
    --radius-sm: 12px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 30px;
    --radius-pill: 25px;

    /* Отступы */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
}

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

body {
    font-family: Ubuntu, Arial, sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    font-size: 16px;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header - как на основном сайте ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-light);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: 0.5px;
}

.header-cta {
    display: inline-block;
    padding: 12px 24px;
    background: var(--brand-red);
    color: var(--text-white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all 0.25s ease;
}

.header-cta:hover {
    background: var(--brand-red-hover);
    transform: translateY(-2px);
}

/* ===== Main ===== */
.main {
    flex: 1;
    padding: var(--space-xl) 0;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-heading);
    text-align: center;
    margin-bottom: var(--space-xs);
}

.page-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: var(--space-xl);
}

/* ===== Form ===== */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ===== Sections - БЕЗ теней как на основном сайте ===== */
.form-section {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: var(--space-lg);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--brand-blue);
    color: var(--text-white);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
}

/* ===== Form inputs ===== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all 0.25s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ===== Packages - карточки в стиле theskill.pro ===== */
.packages {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.package-card {
    position: relative;
    padding: var(--space-lg);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--bg-white);
}

.package-card:hover {
    transform: translateY(-4px);
}

.package-card.selected {
    background: var(--bg-dark);
    color: var(--text-white);
    border-color: var(--bg-dark);
}

.package-card.selected .package-lessons,
.package-card.selected .package-price,
.package-card.selected .package-per-lesson {
    color: var(--text-white);
}

.package-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xs);
}

.package-lessons {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
}

.package-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
}

.package-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.package-per-lesson {
    font-size: 14px;
    color: var(--text-muted);
}

.package-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--brand-red);
    color: var(--text-white);
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-card.selected .package-badge {
    background: var(--brand-yellow);
    color: var(--text-heading);
}

/* Кастомный пакет */
.package-card-custom {
    background: var(--card-yellow);
    border-color: var(--card-yellow);
}

.package-card-custom:hover {
    background: #FFCC7A;
    border-color: #FFCC7A;
}

.package-card-custom.selected {
    background: var(--bg-dark);
    border-color: var(--bg-dark);
}

.package-badge-custom {
    background: var(--brand-blue) !important;
    color: var(--text-white) !important;
}

.custom-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin: var(--space-md) 0 var(--space-xs);
}

.custom-input-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.custom-lessons-input {
    width: 80px;
    padding: 10px 14px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-heading);
    -moz-appearance: textfield;
}

.package-card-custom.selected .custom-lessons-input {
    border-color: var(--text-white);
    background: transparent;
    color: var(--text-white);
}

.custom-lessons-input::-webkit-outer-spin-button,
.custom-lessons-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-lessons-input:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.custom-input-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.package-card-custom.selected .custom-input-label {
    color: var(--text-white);
}

.custom-price-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
}

.package-card-custom.selected .custom-price-value {
    color: var(--text-white);
}

/* ===== Summary - итого ===== */
.summary-section {
    background: var(--brand-blue);
    color: var(--text-white);
    border-color: var(--brand-blue);
}

.summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    opacity: 0.9;
}

.summary-row.total {
    padding-top: var(--space-md);
    margin-top: var(--space-xs);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 20px;
    font-weight: 700;
    opacity: 1;
}

/* ===== Pay Button - красная кнопка как на сайте ===== */
.pay-button {
    width: 100%;
    padding: 18px 60px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-white);
    background: var(--brand-red);
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pay-button:hover:not(:disabled) {
    background: var(--brand-red-hover);
    transform: translateY(-2px);
}

.pay-button:disabled {
    background: var(--border-medium);
    cursor: not-allowed;
    transform: none;
}

.pay-button:active:not(:disabled) {
    transform: translateY(0);
}

.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Benefits - преимущества ===== */
.benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-light);
    border-radius: var(--radius-xl);
}

.benefit {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.benefit-icon {
    font-size: 20px;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: var(--space-xl) 0 var(--space-lg);
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-xl);
}

.footer p {
    margin-bottom: var(--space-xs);
    font-size: 14px;
    color: var(--text-muted);
}

.footer strong {
    color: var(--text-primary);
}

.footer a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s;
}

.footer a:hover {
    color: var(--brand-red);
}

.footer .legal {
    font-size: 12px;
    margin-top: var(--space-md);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .header {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .page-title {
        font-size: 26px;
    }

    .form-section {
        padding: var(--space-md);
    }

    .package-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .package-price {
        font-size: 22px;
    }

    .custom-input-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .benefits {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }

    .pay-button {
        font-size: 14px;
        padding: 16px 40px;
    }
}

/* ===== Result Pages (Success/Fail) ===== */
.result-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}

.result-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    margin-bottom: var(--space-lg);
}

.result-icon.success {
    background: var(--card-green);
    color: var(--success);
}

.result-icon.error {
    background: var(--card-pink);
    color: var(--error);
}

.result-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-heading);
}

.result-message {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.result-button {
    display: inline-block;
    padding: 18px 60px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
    background: var(--brand-red);
    border-radius: var(--radius-xl);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
}

.result-button:hover {
    background: var(--brand-red-hover);
    transform: translateY(-2px);
}

.result-details {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    text-align: left;
    width: 100%;
    max-width: 400px;
}

.result-details h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-details-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.result-details-row:last-child {
    border-bottom: none;
}

.result-details-label {
    color: var(--text-muted);
}

.result-details-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Payment Methods ===== */
.payment-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.payment-method {
    height: 24px;
    opacity: 0.6;
    transition: opacity 0.25s;
}

.payment-method:hover {
    opacity: 1;
}
