/* Help Center — shared styles for /docs/ pages */

/* ---- Layout ---- */
.docs-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 56px);
}

.docs-sidebar {
    position: sticky;
    top: 56px;
    width: 240px;
    min-width: 240px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg-primary);
    padding: 24px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.docs-sidebar-inner {
    padding: 0 16px;
}

.docs-sidebar h3 {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.55;
    margin: 28px 0 6px;
    padding: 0 8px;
}

.docs-sidebar h3:first-child {
    margin-top: 0;
}

.docs-sidebar a {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s;
}

.docs-sidebar a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.docs-sidebar a.active {
    background: var(--accent);
    color: #fff;
}

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 40px 48px 80px;
    max-width: 860px;
}

/* ---- Hero (index page) ---- */
.docs-hero {
    padding: 72px 0 36px;
    background: linear-gradient(135deg, #0f1115 0%, #1a1d24 100%);
    border-bottom: 1px solid var(--border);
}

.docs-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.docs-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ---- Topic grid (index page) ---- */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 48px 0 80px;
}

.docs-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.15s;
}

.docs-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.docs-card-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.docs-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.docs-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ---- Article content ---- */
.docs-content h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.docs-content .docs-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 32px;
}

.docs-content h2 {
    font-size: 1.3rem;
    margin: 36px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.docs-content h2:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.docs-content h3 {
    font-size: 1.08rem;
    margin: 24px 0 8px;
}

.docs-content p {
    margin-bottom: 12px;
    line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
    margin: 0 0 16px 20px;
    line-height: 1.7;
}

.docs-content li {
    margin-bottom: 6px;
}

.docs-content a {
    color: var(--accent);
    text-decoration: none;
}

.docs-content a:hover {
    text-decoration: underline;
}

.docs-content code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid var(--border);
}

/* ---- Steps (numbered workflow) ---- */
.docs-steps {
    counter-reset: step;
    list-style: none;
    margin: 0 0 24px 0;
    padding: 0;
}

.docs-steps li {
    counter-increment: step;
    position: relative;
    padding: 16px 16px 16px 52px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.docs-steps li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 16px;
    width: 26px;
    height: 26px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.docs-steps li strong {
    display: block;
    margin-bottom: 4px;
}

/* ---- Settings table ---- */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.docs-table th,
.docs-table td {
    border: 1px solid var(--border);
    padding: 10px;
    vertical-align: top;
    text-align: left;
}

.docs-table th {
    background: #1a1d24;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.docs-table td {
    line-height: 1.5;
}

/* ---- Tip / Note / Warning boxes ---- */
.docs-tip,
.docs-note,
.docs-warning {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.docs-tip {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--accent);
}

.docs-note {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success);
}

.docs-warning {
    background: rgba(255, 165, 0, 0.1);
    border-left: 3px solid #ffa500;
}

.docs-tip strong,
.docs-note strong,
.docs-warning strong {
    display: block;
    margin-bottom: 4px;
}

/* ---- Screenshot placeholder ---- */
.docs-shot {
    margin: 16px 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #0f1115;
}

.docs-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.docs-shot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border: 2px dashed var(--border);
    border-radius: 10px;
    margin: 16px 0;
}

.docs-shot figcaption {
    padding: 8px 10px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    background: #161a22;
}

/* ---- Pro badge ---- */
.docs-pro {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 4px;
    letter-spacing: 0.03em;
}

/* ---- Keyboard shortcut key ---- */
.docs-kbd {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Menlo, monospace;
    font-size: 0.82rem;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 1px 0 var(--border);
}

/* ---- Prev / Next navigation ---- */
.docs-pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.docs-pager a {
    display: flex;
    flex-direction: column;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
    min-width: 0;
    max-width: 48%;
}

.docs-pager a:hover {
    border-color: var(--accent);
}

.docs-pager-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.docs-pager-title {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.docs-pager .next {
    margin-left: auto;
    text-align: right;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .docs-sidebar {
        display: none;
    }

    .docs-content {
        padding: 24px 16px 60px;
    }

    .docs-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .docs-grid {
        grid-template-columns: 1fr;
        padding: 24px 0 48px;
    }

    .docs-pager {
        flex-direction: column;
    }

    .docs-pager a {
        max-width: 100%;
    }
}

/* Mobile sidebar toggle */
.docs-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .docs-sidebar-toggle {
        display: flex;
    }

    .docs-sidebar.open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 200;
        width: 280px;
        height: 100vh;
        padding-top: 16px;
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    }
}
