/* =============================================
   HELP CENTER — Центр помощи
   Стили модального окна помощи, FAB-кнопки,
   табов, гайд-шагов и FAQ
   ============================================= */

/* --- FAB кнопка помощи --- */
.help-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.help-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(52, 152, 219, 0.55);
}

.help-fab:active {
    transform: scale(0.95);
}

/* --- Overlay --- */
.help-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.help-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* --- Модалка --- */
.help-modal {
    background: #fff;
    border-radius: 16px;
    width: 92%;
    max-width: 820px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.25s;
}

.help-modal-overlay.is-open .help-modal {
    transform: translateY(0);
}

/* --- Заголовок --- */
.help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
}

.help-modal-title {
    margin: 0;
    font-size: 1.15rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.help-modal-title i {
    color: #3498db;
}

.help-modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.help-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* --- Табы --- */
.help-tabs-bar {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    background: #fafbfc;
}

.help-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #999;
    position: relative;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.help-tab.is-active {
    color: #3498db;
}

.help-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: #3498db;
    border-radius: 3px 3px 0 0;
}

.help-tab:hover:not(.is-active) {
    color: #666;
}

/* --- Контент --- */
.help-modal-body {
    overflow-y: auto;
    padding: 1.5rem;
    flex: 1;
}

/* --- Гайд шаги --- */
.help-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.help-guide-step {
    padding: 1rem 1rem 1rem 1.25rem;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.help-guide-step-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.help-guide-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.help-guide-step-header strong {
    font-size: 0.95rem;
    color: #2c3e50;
}

.help-guide-step-text {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
    padding-left: 2.4rem;
    line-height: 1.5;
}

/* --- FAQ --- */
.help-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-faq-item {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.help-faq-item summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s;
}

.help-faq-item summary::-webkit-details-marker {
    display: none;
}

.help-faq-item summary:hover {
    background: #f0f0f0;
}

.help-faq-arrow {
    transition: transform 0.2s;
    color: #3498db;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.help-faq-item[open] > summary .help-faq-arrow {
    transform: rotate(90deg);
}

.help-faq-answer {
    padding: 0 1rem 0.75rem 2.1rem;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
}

.help-faq-answer code {
    background: #e9ecef;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.82rem;
}

/* --- Поиск --- */
.help-search-box {
    margin-bottom: 1rem;
}

.help-search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f8f9fa;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.help-search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    background: #fff;
}

/* --- Адаптив --- */
@media (max-width: 600px) {
    .help-modal {
        width: 98%;
        max-height: 92vh;
        border-radius: 12px;
    }

    .help-fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .help-tab {
        font-size: 0.8rem;
        padding: 0.6rem 0.4rem;
    }
}
