/**
 * ❓ ПОМОЩЬ - help.css
 * Стили для страницы помощи и поддержки
 * Используются только переменные из variables.css, мобильно-ориентированный дизайн
 */

/* ============================================================================
   📱 ОСНОВНАЯ СТРУКТУРА ПОМОЩИ
   ============================================================================ */

.help-page {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-sm);
}

.help-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.help-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-xs);
}

.help-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ============================================================================
   🔍 ПОИСК ПОМОЩИ
   ============================================================================ */

.help-search {
    margin-bottom: var(--spacing-lg);
}

.help-search-input {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: border-color 0.2s ease;
}

.help-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.help-search-input::placeholder {
    color: var(--text-secondary);
}

/* ============================================================================
   📚 КАТЕГОРИИ ПОМОЩИ
   ============================================================================ */

.help-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.help-category {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px; /* Touch target */
}

.help-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.help-category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
}

.help-category-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-xs);
}

.help-category-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================================================
   📋 FAQ СЕКЦИЯ
   ============================================================================ */

.help-faq {
    margin-bottom: var(--spacing-lg);
}

.help-section-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--accent-primary);
}

.faq-list {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    padding: var(--spacing-md);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px; /* Touch target */
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background: var(--bg-hover);
}

.faq-question-text {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

.faq-toggle {
    color: var(--accent-primary);
    font-size: var(--font-size-lg);
    transition: transform 0.2s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 var(--spacing-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: var(--spacing-md);
    max-height: 500px;
}

.faq-answer-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================================================
   📞 КОНТАКТНАЯ ИНФОРМАЦИЯ
   ============================================================================ */

.help-contact {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    margin-bottom: var(--spacing-lg);
}

.help-contact-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-md);
}

.contact-methods {
    display: grid;
    gap: var(--spacing-md);
}

.contact-method {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-height: 44px; /* Touch target */
}

.contact-method:hover {
    background: var(--bg-hover);
}

.contact-icon {
    width: 20px;
    height: 20px;
    margin-right: var(--spacing-sm);
    color: var(--accent-primary);
}

.contact-info {
    flex: 1;
}

.contact-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.contact-description {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* ============================================================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================================ */

@media (max-width: 480px) {
    .help-page {
        padding: var(--spacing-sm);
    }
    
    .help-categories {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .help-category {
        padding: var(--spacing-sm);
    }
    
    .help-category-icon {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-base);
    }
    
    .faq-question {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .faq-item.active .faq-answer {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .contact-methods {
        gap: var(--spacing-sm);
    }
    
    .contact-method {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* ============================================================================
   🎯 СОСТОЯНИЯ И ИНТЕРАКТИВНОСТЬ
   ============================================================================ */

.help-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.help-error {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-secondary);
}

.help-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.search-results {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-light);
    max-height: 300px;
    overflow-y: auto;
    margin-top: var(--spacing-xs);
}

.search-result-item {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-xs);
}

.search-result-snippet {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* ============================================================================
   🔧 ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .help-category,
    .faq-toggle,
    .faq-answer,
    .contact-method {
        transition: none;
    }
}

.help-category:focus,
.faq-question:focus,
.contact-method:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.help-search-input:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}