/* ==========================================================================
   HUB CONSULTATION — Стили Instagram Self-Booking Flow
   ========================================================================== */

.consultation-page {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Общие стили разметки */
.consultation-main {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 20px 16px 60px;
    box-sizing: border-box;
}

/* Скрытые стейджи по умолчанию */
.hub-stage {
    display: none;
    opacity: 0;
}

.hub-stage.is-active {
    display: block;
    opacity: 1;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error boundary */
.error-boundary {
    background: rgba(240, 74, 54, 0.1);
    border: 1px solid var(--red);
    color: #ff6b5a;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* ==========================================================================
   STAGE 1: QUIZ & FORM SCREEN
   ========================================================================== */

/* Hero блок */
.consultation-hero {
    text-align: center;
    margin-bottom: 32px;
}

.hero-badge {
    display: inline-block;
    background: rgba(240, 74, 54, 0.15);
    color: var(--red);
    border: 1px solid rgba(240, 74, 54, 0.3);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.consultation-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.25;
    color: var(--ink);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.consultation-subtitle {
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.5;
    padding: 0 10px;
}

/* Квиз-вопросы */
.quiz-group {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.quiz-question-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 20px;
    letter-spacing: -0.2px;
}

.quiz-question-title span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--red);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 1px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Кастомные карточки-радиокнопки (Modern Clean UI) */
.quiz-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Скрываем нативный radio */
.quiz-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Кастомный кружок-бокс */
.quiz-card-box {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid var(--muted);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.quiz-card-box::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: #fff;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.quiz-card-content strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
    transition: color 0.2s ease;
}

.quiz-card-content span {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
    transition: color 0.2s ease;
}

/* Hover-эффект */
.quiz-card:hover {
    border-color: rgba(240, 74, 54, 0.3);
    background: rgba(240, 74, 54, 0.01);
}

/* Active/Checked state с использованием :has() */
.quiz-card:has(input:checked) {
    border-color: var(--red);
    background: rgba(240, 74, 54, 0.05);
    box-shadow: 0 0 16px rgba(240, 74, 54, 0.15);
    transform: translateY(-1px);
}

.quiz-card:has(input:checked) .quiz-card-box {
    border-color: var(--red);
    background: var(--red);
}

.quiz-card:has(input:checked) .quiz-card-box::after {
    transform: scale(1);
}

.quiz-card:has(input:checked) .quiz-card-content strong {
    color: var(--ink);
}

.quiz-card:has(input:checked) .quiz-card-content span {
    color: var(--text);
}

/* Контактная секция */
.contact-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 32px;
}

.contact-section-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 8px;
    text-align: center;
}

.contact-section-subtitle {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.45;
    text-align: center;
    margin-bottom: 24px;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-field input[type="text"],
.form-field input[type="tel"] {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

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

.form-field input:focus {
    border-color: var(--red);
    background: rgba(240, 74, 54, 0.02);
    box-shadow: 0 0 10px rgba(240, 74, 54, 0.1);
}

/* Ошибка формы */
.form-error {
    background: rgba(240, 74, 54, 0.1);
    border: 1px solid rgba(240, 74, 54, 0.3);
    color: #ff6b5a;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 20px;
    text-align: left;
}

/* Кнопка отправки */
.submit-btn {
    position: relative;
    width: 100%;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(240, 74, 54, 0.3);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover {
    background: var(--red-hover);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px rgba(240, 74, 54, 0.45);
}

.submit-btn:active {
    background: var(--red-active);
    transform: translateY(0);
}

/* Loader */
.submit-btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

/* Чекбокс согласия */
.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.consent-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-checkbox-box {
    position: relative;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--muted);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.consent-checkbox-box::after {
    content: '✓';
    position: absolute;
    left: 2.5px;
    top: -1.5px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.consent-checkbox input:checked + .consent-checkbox-box {
    border-color: var(--red);
    background: var(--red);
}

.consent-checkbox input:checked + .consent-checkbox-box::after {
    transform: scale(1);
}

.consent-text {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.4;
    text-align: left;
}

.consent-text a {
    color: var(--text);
    text-decoration: underline;
}

.consent-text a:hover {
    color: var(--ink);
}


/* ==========================================================================
   STAGE 2: SUCCESS SCREEN
   ========================================================================== */

.success-header {
    text-align: center;
    margin-bottom: 28px;
}

.success-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.success-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* Карточка таймера */
.timer-card {
    background: var(--panel);
    border: 1.5px solid rgba(240, 74, 54, 0.25);
    border-radius: 20px;
    padding: 24px 20px;
    margin-top: 24px;
    box-shadow: 0 8px 32px rgba(240, 74, 54, 0.08);
    text-align: center;
}

.timer-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.timer-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-countdown {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 46px;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(240, 74, 54, 0.2);
}

.timer-card-progress {
    width: 100%;
    height: 5px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.timer-card-progress-bar {
    width: 100%;
    height: 100%;
    background: var(--red);
    border-radius: 10px;
    transition: width 1s linear;
}

.timer-card-desc {
    font-size: 14px;
    color: var(--text);
    line-height: 1.55;
    padding: 0 6px;
}

.timer-card-desc strong {
    color: var(--ink);
    background: var(--soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Блок сообщества (Telegram) */
.community-block {
    background: linear-gradient(135deg, #1d273a 0%, #111b2b 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 20px;
    padding: 24px 20px;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.community-block::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 120px;
    height: 120px;
    background: rgba(14, 165, 233, 0.08);
    border-radius: 50%;
    filter: blur(20px);
}

.community-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    border-radius: 12px;
}

.tg-svg-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.community-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.community-kicker {
    font-size: 11px;
    font-weight: 800;
    color: #0ea5e9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.community-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
}

.community-text {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
}

.telegram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #0ea5e9;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    margin-top: 8px;
}

.telegram-btn:hover {
    background: #0284c7;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.tg-btn-icon {
    width: 18px;
    height: 18px;
}

/* Цитаты прессы (Press Mentions) */
.press-section {
    margin-bottom: 40px;
    border-top: 1px solid var(--border);
    padding-top: 32px;
}

.press-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.2px;
}

.press-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.press-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.press-logo {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 8px;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
}

.press-logo.forbes {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.press-logo.rbc {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.press-logo.vedomosti {
    color: #d93d2b;
    background: rgba(217, 61, 43, 0.1);
}

.press-quote {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    font-style: italic;
}

/* Лицензии и информация */
.licenses-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.licenses-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 12px;
}

.licenses-content p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.licenses-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 16px;
}

.license-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.license-item strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}

.license-item span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.license-disclaimer {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
    text-align: justify;
}

/* Кнопка повторной отправки */
.retry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--red);
    border: 1.5px solid var(--red);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    width: 100%;
    max-width: 280px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.retry-btn:hover {
    background: rgba(240, 74, 54, 0.05);
    transform: translateY(-1px);
}

.retry-btn:active {
    transform: translateY(0);
}

.retry-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ==========================================================================
   Адаптивность
   ========================================================================== */
@media (max-width: 480px) {
    .consultation-title {
        font-size: 23px;
    }
    
    .timer-countdown {
        font-size: 40px;
    }
    
    .success-title {
        font-size: 24px;
    }
}
