/* Help Center Styling - Responsive Design */

:root {
    --help-accent: #4a90e2;
    --help-border: #e0e0e0;
    --help-bg-light: #f8f9fa;
    --help-text-muted: #6c757d;
    --help-success: #28a745;
    --help-warning: #ffc107;
}

/* Main Help Center Container */
.help-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.help-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--help-border);
    padding-bottom: 1rem;
}

.help-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.help-header .subtitle {
    color: var(--help-text-muted);
    font-size: 1rem;
}

/* Search Bar */
.help-search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.help-search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--help-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.help-search-bar button {
    padding: 0.75rem 1.5rem;
    background-color: var(--help-accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.help-search-bar button:hover {
    background-color: #357abd;
}

/* Sidebar Layout */
.help-main-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .help-main-grid {
        grid-template-columns: 1fr;
    }
}

/* Category Sidebar */
.help-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.help-sidebar-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.help-category-item {
    padding: 0.75rem 1rem;
    background-color: var(--help-bg-light);
    border-left: 4px solid transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-category-item:hover {
    background-color: #e8f0ff;
    border-left-color: var(--help-accent);
}

.help-category-item.active {
    background-color: #e8f0ff;
    border-left-color: var(--help-accent);
    font-weight: 500;
}

.help-category-count {
    font-size: 0.85rem;
    color: var(--help-text-muted);
    background-color: rgba(74, 144, 226, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

/* Article Grid */
.help-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .help-articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .help-articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Article Card */
.help-article-card {
    background: white;
    border: 1px solid var(--help-border);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.help-article-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--help-accent);
    transform: translateY(-2px);
}

.help-article-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.help-article-card-summary {
    color: var(--help-text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.help-article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--help-text-muted);
    border-top: 1px solid var(--help-border);
    padding-top: 0.75rem;
}

.help-article-card-category {
    background-color: var(--help-bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-weight: 500;
    color: var(--help-accent);
}

.help-article-card-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Detail Panel / Modal */
.help-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.help-detail-panel {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

@media (max-width: 640px) {
    .help-detail-panel {
        max-height: 95vh;
        padding: 1.5rem;
    }
}

.help-detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--help-text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.help-detail-close:hover {
    color: var(--text-primary);
}

.help-detail-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--help-border);
    padding-bottom: 1rem;
}

.help-detail-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.help-detail-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--help-text-muted);
    flex-wrap: wrap;
}

.help-detail-content {
    line-height: 1.8;
    color: var(--text-primary);
    margin: 1.5rem 0;
}

.help-detail-content h2,
.help-detail-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.help-detail-content p {
    margin: 0.75rem 0;
}

.help-detail-content ul,
.help-detail-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.help-detail-content li {
    margin: 0.5rem 0;
}

.help-detail-feedback {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--help-border);
}

.help-detail-feedback-label {
    font-weight: 500;
    color: var(--text-primary);
}

.help-detail-feedback-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--help-border);
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.help-detail-feedback-btn:hover {
    background-color: var(--help-bg-light);
    border-color: var(--help-accent);
}

.help-detail-feedback-btn.helpful {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--help-success);
    border-color: var(--help-success);
}

.help-detail-feedback-btn.unhelpful {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ff9800;
    border-color: #ff9800;
}

/* Glossary Styles */
.help-glossary-container {
    max-width: 900px;
}

.help-glossary-index {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.help-glossary-letter {
    padding: 0.5rem 0.75rem;
    background-color: var(--help-bg-light);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.help-glossary-letter:hover {
    background-color: var(--help-accent);
    color: white;
}

.help-glossary-group {
    margin-bottom: 2rem;
}

.help-glossary-group-header {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--help-accent);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--help-border);
}

.help-glossary-term {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--help-bg-light);
    border-radius: 6px;
    transition: all 0.2s;
}

.help-glossary-term:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.help-glossary-term-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.help-glossary-term-definition {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.help-glossary-term-context {
    display: inline-block;
    background-color: rgba(74, 144, 226, 0.2);
    color: var(--help-accent);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Knowledge Library Styles */
.help-library-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.help-library-filters select,
.help-library-filters input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--help-border);
    border-radius: 4px;
    font-size: 0.95rem;
}

.help-library-filters select {
    flex: 1;
    min-width: 150px;
}

.help-library-document {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border: 1px solid var(--help-border);
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.help-library-document:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--help-accent);
}

.help-library-document-icon {
    font-size: 2rem;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-library-document-content {
    flex: 1;
}

.help-library-document-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.help-library-document-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--help-text-muted);
    flex-wrap: wrap;
}

.help-library-document-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.help-library-document-btn {
    padding: 0.4rem 0.8rem;
    background-color: var(--help-bg-light);
    border: 1px solid var(--help-border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.help-library-document-btn:hover {
    background-color: var(--help-accent);
    color: white;
    border-color: var(--help-accent);
}

/* Admin Styles */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--help-border);
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.admin-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-filters input,
.admin-filters select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--help-border);
    border-radius: 4px;
}

.admin-form-section {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--help-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--help-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--help-accent);
    color: white;
}

.btn-primary:hover {
    background-color: #357abd;
}

.btn-secondary {
    background-color: var(--help-bg-light);
    color: var(--text-primary);
    border: 1px solid var(--help-border);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Loading & Empty States */
.help-loading,
.help-empty {
    padding: 2rem;
    text-align: center;
    color: var(--help-text-muted);
}

.help-empty p {
    font-size: 1.05rem;
}

/* Responsive Mobile */
@media (max-width: 640px) {
    .help-container,
    .admin-container {
        padding: 1rem;
    }

    .help-header h1 {
        font-size: 1.5rem;
    }

    .help-article-card {
        padding: 1rem;
    }

    .help-search-bar {
        flex-direction: column;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
