/* Custom styles for PowerShell Reference Guide */

/* ===== H1 HEADING STYLES ===== */
.md-typeset h1 {
    color: #2c3e50;
    font-weight: 700;
}

/* Dark mode variant - very light gray */
[data-md-color-scheme="slate"] .md-typeset h1 {
    color: #d4d4d4;
}


/* ===== H2 HEADING STYLES ===== */
/* Option 1: All H2 headings in accent color with icon support */
.md-typeset h2 {
    color: var(--md-primary-fg-color);
    font-weight: 600;
}

/* Option 2: H2 headings with left border accent (more subtle) */
/*
.md-typeset h2 {
    border-left: 4px solid var(--md-accent-fg-color);
    padding-left: 1rem;
    color: var(--md-primary-fg-color);
}
*/

/* Option 3: H2 with background highlight */
/*
.md-typeset h2 {
    background: linear-gradient(90deg, rgba(63, 81, 181, 0.1) 0%, transparent 100%);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: var(--md-primary-fg-color);
}
*/

/* ===== H3 HEADING STYLES ===== */
/* Very dark gray - maintains hierarchy while being readable */
.md-typeset h3 {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Dark mode variant - very light gray */
[data-md-color-scheme="slate"] .md-typeset h3 {
    color: #d4d4d4;
}

/* ===== TABLE OF CONTENTS (TOC) STYLES ===== */

/* Light Mode: Make H2 entries in TOC bolder and more prominent */
.md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav__link {
    font-weight: 700;
    font-size: 0.75rem;
    /*color: var(--md-primary-fg-color);*/
    color: #2c3e50;
}

/* Dark Mode: H2 entries in TOC */
[data-md-color-scheme="slate"] .md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav__link {
    font-weight: 700;
    font-size: 0.75rem;
    /*color: var(--md-primary-fg-color);*/
    color: #d4d4d4;
}

/* Make H2 entries in TOC bolder and more prominent */
.md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav__link {
    font-weight: 700;
    font-size: 0.75rem;
    /*color: var(--md-primary-fg-color);*/
    color: #2c3e50;
}

/* Make H3 entries in TOC smaller and lighter */
.md-nav--secondary .md-nav__list .md-nav__list .md-nav__link {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--md-default-fg-color--light);
    padding-left: 1.5rem;
}

/* Active TOC item highlighting */
.md-nav--secondary .md-nav__item--active > .md-nav__link {
    font-weight: 700;
    color: var(--md-accent-fg-color);
}


.md-nav--secondary .md-nav__list .md-nav__list.toc-expanded {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

/* Add expand/collapse indicator for sections with subsections */
.md-nav--secondary .md-nav__item--nested > .md-nav__link {
    position: relative;
    cursor: pointer;
}

.md-nav--secondary .md-nav__item--nested > .md-nav__link::after {
    content: "▶";
    position: absolute;
    right: 0.6rem;
    font-size: 0.5rem;
    transition: transform 0.25s;
    color: var(--md-default-fg-color--light);
}

.md-nav--secondary .md-nav__item--nested.toc-expanded > .md-nav__link::after {
    transform: rotate(90deg);
}

/* ===== EMOJI/ICON SUPPORT IN HEADINGS ===== */
/* Ensure emojis/icons in headings are properly sized and colored */
.md-typeset h2 .twemoji,
.md-typeset h2 .emoji {
    height: 1.2em;
    width: 1.2em;
    vertical-align: -0.2em;
    margin-right: 0.3em;
}

/* ===== ALTERNATE: Auto-prefix icons based on heading text ===== */
/* Uncomment to add automatic icons to common section types */
/*
.md-typeset h2:is(:contains("Overview"))::before { content: "📖 "; }
.md-typeset h2:is(:contains("Example"))::before { content: "💡 "; }
.md-typeset h2:is(:contains("Syntax"))::before { content: "⚙️ "; }
.md-typeset h2:is(:contains("Tips"))::before { content: "💡 "; }
.md-typeset h2:is(:contains("Warning"))::before { content: "⚠️ "; }
.md-typeset h2:is(:contains("Related"))::before { content: "🔗 "; }
*/
