/* ============================================================
   MnemoDeck Help Documentation Styles
   help.css -- Help-specific styles only.
   Does NOT redefine any classes from style.css.
   ============================================================ */

/* --- Scoping ------------------------------------------------ */
.help-page {
    padding: 40px 0 60px;
    min-height: 70vh;
}

/* --- Help Secondary Navigation ------------------------------ */
.help-nav {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    position: sticky;
    top: 64px;            /* sits below the primary navbar */
    z-index: 999;
}

.help-nav .container {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.help-nav-list {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.help-nav-item {
    position: relative;
}

.help-nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 3px solid transparent;
}

.help-nav-link:hover {
    color: var(--primary-color);
}

.help-nav-link-active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Dropdown within help nav */
.help-nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    min-width: 220px;
    z-index: 1000;
    padding: 6px 0;
    list-style: none;
    margin: 0;
}

.help-nav-item:hover .help-nav-dropdown {
    display: block;
}

.help-nav-dropdown a {
    display: block;
    padding: 8px 18px;
    font-size: 0.85rem;
    color: var(--text-color);
    transition: background 0.2s;
}

.help-nav-dropdown a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* Dropdown indicator arrow */
.help-nav-item.has-dropdown > .help-nav-link::after {
    content: "\f107";          /* Font Awesome chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 6px;
    font-size: 0.7rem;
}

/* --- Breadcrumb --------------------------------------------- */
.breadcrumb {
    padding: 12px 0;
    font-size: 0.85rem;
    color: #888;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-color);
    font-weight: 500;
}

/* --- Help Section Cards ------------------------------------- */
.help-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.help-section h2 {
    font-size: 1.6rem;
    color: var(--dark-bg);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.help-section h3 {
    font-size: 1.2rem;
    color: var(--dark-bg);
    margin-top: 24px;
    margin-bottom: 10px;
}

.help-section p {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.7;
}

.help-subsection {
    margin-top: 20px;
    padding-left: 16px;
    border-left: 3px solid #e8e8e8;
}

/* --- Steps List --------------------------------------------- */
.steps-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.steps-list li {
    counter-increment: step-counter;
    position: relative;
    padding: 10px 0 10px 48px;
    line-height: 1.7;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.steps-list li:last-child {
    border-bottom: none;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 10px;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Tip & Warning Boxes ------------------------------------ */
.tip-box,
.warning-box {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.tip-box {
    background: #eef4ff;
    border-left: 4px solid var(--primary-color);
    color: #2c3e6b;
}

.tip-box::before {
    content: "\f0eb";          /* Font Awesome lightbulb */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
    color: var(--primary-color);
}

.warning-box {
    background: #fff5f0;
    border-left: 4px solid var(--secondary-color);
    color: #6b2c2c;
}

.warning-box::before {
    content: "\f071";          /* Font Awesome triangle-exclamation */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
    color: var(--secondary-color);
}

/* --- Image Placeholders (before screenshots are added) ------ */
.image-placeholder {
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
}

.image-placeholder-sm {
    float: right;
    max-width: 400px;
    margin: 0 0 1rem 1.5rem;
    padding: 24px 16px;
    border-radius: 8px;
}

.placeholder-inner {
    color: #999;
}

.placeholder-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
    color: #bbb;
}

.image-placeholder-sm .placeholder-icon {
    font-size: 1.4rem;
}

.placeholder-label {
    font-size: 0.85rem;
    font-style: italic;
}

/* --- Screenshot Images (after screenshots are added) -------- */
.help-screenshot {
    display: block;
    max-width: 100%;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
}

.help-screenshot-sm {
    float: right;
    max-width: 400px;
    margin: 0 0 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
}

/* Clear float after supplementary images */
.clear-float {
    clear: both;
}

/* --- Keyboard Shortcut Styling ------------------------------ */
.keyboard-shortcut,
kbd {
    display: inline-block;
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 2px 8px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85em;
    color: var(--dark-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* --- Shortcut Table (keyboard-shortcuts.html) --------------- */
.shortcut-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.shortcut-table th,
.shortcut-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.shortcut-table th {
    background: var(--dark-bg);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.shortcut-table tr:hover {
    background: #f8f9fa;
}

.shortcut-table td:first-child {
    white-space: nowrap;
}

/* --- Bottom Page Navigation --------------------------------- */
.help-bottom-nav {
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-top: 40px;
}

.help-bottom-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-bottom-nav a {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.help-bottom-nav a:hover {
    text-decoration: underline;
}

/* --- Help TOC (help/index.html landing page) ---------------- */
.help-toc {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.help-toc-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 24px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.help-toc-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.help-toc-card h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.help-toc-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.help-toc-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* --- Help Hero (landing page) ------------------------------- */
.help-hero {
    text-align: center;
    padding: 40px 0 20px;
}

.help-hero h1 {
    font-size: 2.5rem;
    color: var(--dark-bg);
    margin-bottom: 8px;
}

.help-hero h1 span {
    color: var(--primary-color);
}

.help-hero .version-badge {
    display: inline-block;
    background: var(--gradient-main);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.help-hero p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Details/Summary Collapsible Sections ------------------- */
.help-page details {
    margin-bottom: 8px;
}

.help-page details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-bg);
    padding: 10px 0;
    list-style: none;
    transition: color 0.2s;
}

.help-page details summary::-webkit-details-marker {
    display: none;
}

.help-page details summary::before {
    content: "\f054";          /* Font Awesome chevron-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7rem;
    margin-right: 10px;
    transition: transform 0.2s;
    display: inline-block;
    color: var(--primary-color);
}

.help-page details[open] summary::before {
    transform: rotate(90deg);
}

.help-page details .details-content {
    padding: 12px 0 12px 24px;
}

/* --- Cross-reference Links ---------------------------------- */
.related-links {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

.related-links h4 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-links a {
    display: inline-block;
    margin-right: 16px;
    margin-bottom: 6px;
    color: var(--primary-color);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.related-links a:hover {
    text-decoration: underline;
}

/* --- Responsive --------------------------------------------- */
@media (max-width: 768px) {
    .help-nav {
        top: 0;
    }

    .help-nav .container {
        padding: 0 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .help-nav-link {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .help-nav-dropdown {
        position: static;
        box-shadow: none;
        border-radius: 0;
        border-top: 1px solid #eee;
    }

    .help-section {
        padding: 20px 16px;
        border-radius: 8px;
    }

    /* Supplementary images lose float and become full-width on mobile */
    .help-screenshot-sm {
        float: none;
        display: block;
        max-width: 100%;
        margin: 16px auto;
    }

    .image-placeholder-sm {
        float: none;
        max-width: 100%;
        margin: 16px 0;
    }

    .help-toc {
        grid-template-columns: 1fr;
    }

    .help-hero h1 {
        font-size: 1.8rem;
    }

    .help-bottom-nav .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .shortcut-table th,
    .shortcut-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}
