/* ===========================
   СТИЛИ ДЛЯ ОНБОРДИНГ-ТУРА v2.0
   Landing-style с каруселью
   =========================== */

/* ==================
   Оверлей
   ================== */
#onboarding-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}
#onboarding-overlay.active {
    opacity: 1;
    visibility: visible;
}

body:has(#onboarding-overlay.active) .notes-drawer { z-index: 1 !important; }

/* Подсветка */
.onboarding-spotlight {
    position: absolute;
    background: transparent;
    border: 3px solid #007bff;
    border-radius: 12px;
    box-shadow: 0 0 0 4px rgba(0,123,255,.3), 0 0 20px 8px rgba(0,123,255,.5);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    animation: spotlight-pulse 2s infinite;
}
@keyframes spotlight-pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(0,123,255,.3), 0 0 20px 8px rgba(0,123,255,.5); }
    50%     { box-shadow: 0 0 0 6px rgba(0,123,255,.4), 0 0 30px 12px rgba(0,123,255,.7); }
}

/* ==================
   Тултип-контейнер
   ================== */
#onboarding-tooltip {
    position: fixed;
    width: 92%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(145deg, #141824 0%, #1e2538 100%);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
    z-index: 10001;
    opacity: 0; visibility: hidden;
    transform: scale(0.92) translateY(-10px);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid rgba(100,140,255,.15);
}
#onboarding-tooltip.active {
    opacity: 1; visibility: visible;
    transform: scale(1) translateY(0);
}

#onboarding-tooltip .tooltip-content {
    display: flex;
    flex-direction: column;
}

/* ==================
   Шапка
   ================== */
#onboarding-tooltip .tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px 14px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
#onboarding-tooltip .tooltip-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
    text-align: center;
}
#onboarding-tooltip .tooltip-close {
    background: rgba(255,255,255,.08);
    border: none; color: #8899aa;
    font-size: 24px; width: 34px; height: 34px;
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; padding: 0; flex-shrink: 0;
}
#onboarding-tooltip .tooltip-close:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

/* ==================
   Тело
   ================== */
#onboarding-tooltip .tooltip-body {
    padding: 18px 22px;
    color: #c5cdd8;
    font-size: 14px;
    line-height: 1.65;
}
#onboarding-tooltip .tooltip-body b { color: #a8c8ff; font-weight: 600; }

/* ==================
   Подвал
   ================== */
#onboarding-tooltip .tooltip-footer {
    padding: 14px 22px 18px;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Прогресс-точки */
#onboarding-tooltip .progress-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}
#onboarding-tooltip .progress-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    transition: all 0.3s;
}
#onboarding-tooltip .progress-dot.active {
    width: 24px; border-radius: 4px;
    background: #007bff;
}
#onboarding-tooltip .progress-dot.done {
    background: #007bff;
    opacity: .5;
}

/* Кнопки */
#onboarding-tooltip .tooltip-buttons {
    display: flex;
    gap: 10px;
}
#onboarding-tooltip .tooltip-buttons button {
    padding: 10px 22px;
    border: none; border-radius: 10px;
    cursor: pointer; font-size: 14px; font-weight: 600;
    transition: all 0.2s; white-space: nowrap;
}
#onboarding-tooltip .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056d6);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,123,255,.35);
}
#onboarding-tooltip .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0,123,255,.5);
    transform: translateY(-1px);
}
#onboarding-tooltip .btn-primary:active { transform: translateY(0); }

#onboarding-tooltip .btn-secondary {
    background: rgba(255,255,255,.08);
    color: #a8c8ff;
    border: 1px solid rgba(255,255,255,.12);
}
#onboarding-tooltip .btn-secondary:hover {
    background: rgba(255,255,255,.12);
}

/* ==================
   ШАГ 1: Карусель меню
   ================== */
.onb-carousel {
    user-select: none;
}
.onb-carousel-card {
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 20px;
    border-top: 3px solid #007bff;
    transition: opacity 0.2s, transform 0.25s ease;
    min-height: 140px;
}
.onb-carousel-icon {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}
.onb-carousel-icon svg { stroke-width: 2.2; }
.onb-carousel-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 4px;
}
.onb-carousel-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.onb-carousel-text {
    font-size: 13.5px;
    color: #99a8b8;
    line-height: 1.6;
}

/* Навигация карусели */
.onb-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
}
.onb-carousel-arrow {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    color: #a8c8ff;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 20px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.onb-carousel-arrow:hover {
    background: rgba(0,123,255,.2);
    border-color: rgba(0,123,255,.4);
    color: #fff;
}
.onb-carousel-dots {
    display: flex;
    gap: 6px;
}
.carousel-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    cursor: pointer;
    transition: all 0.25s;
}
.carousel-dot.active {
    width: 20px; border-radius: 4px;
    background: #007bff;
}

/* CTA-подсказка на первом шаге */
.onb-cta-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(0,123,255,.1);
    border: 1px solid rgba(0,123,255,.2);
    border-radius: 10px;
    color: #7db8ff;
    font-size: 13px;
    font-weight: 500;
}
.onb-cta-hint svg { stroke: #7db8ff; flex-shrink: 0; }

/* ==================
   ШАГ 2: Коуч и Навигатор
   ================== */
.onb-subtitle {
    text-align: center;
    color: #8899aa;
    font-size: 13.5px;
    margin-bottom: 16px;
}
.onb-two-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.onb-feature-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    transition: border-color 0.3s, transform 0.2s;
}
.onb-feature-card:hover {
    transform: translateY(-2px);
}
.onb-feature-card.coach {
    border-color: rgba(239,68,68,.25);
}
.onb-feature-card.coach:hover {
    border-color: rgba(239,68,68,.5);
}
.onb-feature-card.navigator {
    border-color: rgba(0,123,255,.25);
}
.onb-feature-card.navigator:hover {
    border-color: rgba(0,123,255,.5);
}
.onb-feature-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.onb-feature-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.onb-feature-desc {
    font-size: 12.5px;
    color: #8899aa;
    line-height: 1.5;
}
.onb-feature-hint {
    text-align: center;
    margin-top: 14px;
    font-size: 12.5px;
    color: #667788;
}
.onb-feature-hint b { color: #a8c8ff; }

/* ==================
   ШАГ 4: Дата рождения
   ================== */
.onb-birthdate-intro {
    font-size: 14px;
    line-height: 1.6;
    color: #c5cdd8;
    margin-bottom: 14px;
}
.onb-birthdate-intro b { color: #a8c8ff; }

.onb-birthdate-topics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.onb-topic {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    font-size: 13px;
    color: #c5cdd8;
    border-left: 3px solid rgba(0,123,255,.3);
}
.onb-topic-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.onb-birthdate-field {
    margin-bottom: 12px;
}
.onb-birthdate-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #a8c8ff;
    margin-bottom: 8px;
}
.onb-birthdate-field input[type="date"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    background: rgba(255,255,255,.06);
    border: 2px solid rgba(0,123,255,.3);
    border-radius: 12px;
    color: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}
.onb-birthdate-field input[type="date"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,.2);
}
.onb-birthdate-field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.onb-birthdate-note {
    text-align: center;
    font-size: 12.5px;
    color: #667788;
    font-style: italic;
}

/* ==================
   ШАГ 6: Установка + Telegram
   ================== */
.onb-install-intro {
    font-size: 14px;
    color: #c5cdd8;
    margin-bottom: 14px;
    line-height: 1.5;
}
.onb-install-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.onb-install-block {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #c5cdd8;
}
.onb-install-block.ios {
    background: rgba(0,107,155,.1);
    border-left: 3px solid #006b9b;
}
.onb-install-block.android {
    background: rgba(16,185,129,.08);
    border-left: 3px solid #10b981;
}
.onb-install-badge {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
}
.onb-install-block.ios .onb-install-badge { color: #4fc3f7; }
.onb-install-block.android .onb-install-badge { color: #34d399; }
.onb-install-steps {
    color: #99a8b8;
}
.onb-install-steps b { color: #e0e6ed; }
.onb-install-steps span {
    color: #667788;
    font-weight: 600;
}

/* Telegram блок */
.onb-tg-block {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: rgba(34,158,217,.08);
    border: 1px solid rgba(34,158,217,.2);
    border-radius: 12px;
    align-items: flex-start;
}
.onb-tg-icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    background: rgba(34,158,217,.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.onb-tg-text {
    font-size: 13px;
    line-height: 1.55;
    color: #99a8b8;
}
.onb-tg-text b { color: #e0e6ed; }

/* ==================
   Адаптивность
   ================== */
@media (max-width: 768px) {
    #onboarding-tooltip {
        width: 94%;
        max-width: none;
        left: 3% !important;
        right: 3%;
    }
    .tooltip-header { padding: 16px 18px 12px; }
    .tooltip-title { font-size: 17px; }
    .tooltip-body { padding: 14px 18px; font-size: 13.5px; }
    .tooltip-footer {
        padding: 12px 18px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .tooltip-buttons {
        width: 100%;
        justify-content: space-between;
    }
    .tooltip-buttons button {
        flex: 1;
        padding: 12px 16px;
    }
    .progress-dots { justify-content: center; }
}

@media (max-width: 400px) {
    .tooltip-title { font-size: 16px; }
    .tooltip-body { font-size: 13px; line-height: 1.5; }
    .onb-carousel-card { padding: 16px; min-height: 120px; }
    .onb-carousel-title { font-size: 15px; }
    .onb-carousel-text { font-size: 12.5px; }
    .onb-feature-desc { font-size: 11.5px; }
    .onb-two-cards { gap: 8px; }
    .onb-feature-card { padding: 14px 10px; }
    .tooltip-close { width: 30px; height: 30px; font-size: 20px; }
}

/* ==================
   Подсветка кнопок нижнего меню (карусель)
   ================== */
.onb-nav-highlight {
    position: relative;
    z-index: 2;
    border-radius: 12px;
    box-shadow:
        0 0 0 3px var(--onb-highlight-color, #007bff),
        0 0 18px 4px var(--onb-highlight-color, #007bff);
    background: rgba(0,0,0,.85);
    transition: box-shadow 0.3s ease, background 0.3s ease;
    animation: onb-nav-glow 1.6s ease-in-out infinite;
}
.onb-nav-highlight .nav-icon svg {
    stroke: var(--onb-highlight-color, #007bff) !important;
}
.onb-nav-highlight .nav-label {
    color: var(--onb-highlight-color, #007bff) !important;
    font-weight: 700;
}
@keyframes onb-nav-glow {
    0%, 100% { box-shadow: 0 0 0 3px var(--onb-highlight-color, #007bff), 0 0 18px 4px var(--onb-highlight-color, #007bff); }
    50%      { box-shadow: 0 0 0 3px var(--onb-highlight-color, #007bff), 0 0 28px 8px var(--onb-highlight-color, #007bff); }
}

/* Затемнённые (неактивные) кнопки */
.onb-nav-dimmed {
    opacity: 0.2 !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* ==================
   Анимации
   ================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
#onboarding-tooltip.active .tooltip-content {
    animation: fadeInUp 0.35s ease-out;
}
