/* ==========================================
   vmoji Documentation - Custom Styles
   Based on BCFS Design System
   ========================================== */

/* CSS Variables - Dark Theme */
:root {
    --bg-primary: #1a1b1e;
    --bg-secondary: #27282b;
    --bg-tertiary: #2f3136;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #6b7280;
    --accent-primary: #3f83f8;
    --accent-hover: #5a95ff;
    --border-color: #3a3b3f;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Bar */
.header-bar {
    background-color: var(--bg-secondary);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-bar h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Navigation Links */
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    position: relative;
    padding-bottom: 0.25rem;
}

/* Accessibility: keep focus behavior consistent with other pages (BCFS/DNS)
   hide focus ring for mouse interactions but provide a subtle keyboard-visible ring */
.nav-link:focus:not(:focus-visible) {
    outline: none;
}

.nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 131, 248, 0.12);
}

/* On mobile, remove tap highlight for better visual consistency */
.nav-link {
    -webkit-tap-highlight-color: transparent;
}

.nav-link:hover {
    /* match BCFS: nav items glow brand-blue on hover and disable native underline */
    color: var(--accent-primary);
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width 0.3s ease-in-out;
}

.nav-link:hover::after {
    width: 100%;
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding-top: 3rem;
    max-width: 1100px;
}

/* Documentation Content */
.docs-content {
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

/* Section Styles */
.doc-section {
    margin-bottom: 3rem;
}

.doc-section:last-child {
    margin-bottom: 0;
}

.section-heading {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.category-heading {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--accent-primary);
}

/* Paragraph Styles */
.doc-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.doc-section p:last-child {
    margin-bottom: 0;
}

/* Inline Code */
code {
    background-color: var(--bg-tertiary);
    color: #e879f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid var(--border-color);
}

/* Links */
.link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Override global landing page link rules inside the vmoji docs area
   The site-wide /assets/style.css sets a:hover -> purple which can cause
   unexpected color changes. Make in-doc links inherit text color and only
   modify border/underline behavior similar to BCFS pages. */
.docs-content a:not(.link):not(.btn):not(.btn-discord):not(.discord-link),
.docs-content a:not(.link):not(.btn):not(.btn-discord):not(.discord-link):visited {
    color: inherit;
    /* keep text color same as surrounding docs */
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
    transition: border-bottom-style 0.2s ease, color 0.15s ease-in-out;
}

.docs-content a:not(.link):not(.btn):not(.btn-discord):not(.discord-link):hover {
    color: inherit;
    /* don't let the global stylesheet change color */
    border-bottom-style: solid;
}

/* Discord Link (matching BCFS incident link style) */
.discord-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
    transition: border-bottom-style 0.2s ease;
}

.discord-link:hover {
    border-bottom-style: solid;
    /* ensure discord links inside docs don't pick up the generic a:hover purple */
    color: inherit;
}

/* Lists */
.steps-list {
    list-style: none;
    counter-reset: step-counter;
    margin: 1rem 0;
    padding-left: 0;
}

.steps-list li {
    counter-increment: step-counter;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
    color: var(--text-secondary);
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--accent-primary);
    color: white;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.feature-list {
    list-style: none;
    margin: 1rem 0;
    padding-left: 0;
}

.feature-list li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.emoji-list {
    list-style: none;
    margin: 1rem 0;
    padding-left: 0;
}

.emoji-list li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.emoji-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

/* Alert Boxes */
.alert {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
    background-color: var(--bg-tertiary);
}

.alert-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
    color: var(--text-secondary);
}

.alert-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.alert-note {
    border-left-color: var(--info-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-tip {
    border-left-color: var(--success-color);
}

/* Command Grid */
.command-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.command-card {
    background-color: var(--bg-tertiary);
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.command-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.command-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.command-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Emoji Category Boxes */
.emoji-category {
    background-color: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.emoji-category:last-child {
    margin-bottom: 0;
}

/* Emoji Grid Display */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.emoji-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.emoji-item:hover {
    border-color: var(--accent-primary);
}

.emoji-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.emoji-info {
    flex: 1;
    min-width: 0;
}

.emoji-command {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 600;
    word-break: break-all;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: var(--text-secondary);
    transition: color 0.2s ease;
    font-size: 14px !important;
}

.footer-link:hover {
    color: var(--text-primary);
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .docs-content {
        padding: 1.5rem;
    }

    .section-heading {
        font-size: 1.5rem;
    }

    .category-heading {
        font-size: 1.25rem;
    }

    .command-grid {
        grid-template-columns: 1fr;
    }

    .emoji-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .header-bar h1 {
        font-size: 1.25rem;
    }

    .content-wrapper {
        padding-top: 2rem;
    }
}

@media (max-width: 480px) {
    .docs-content {
        padding: 1rem;
    }

    .section-heading {
        font-size: 1.25rem;
    }

    .steps-list li {
        padding-left: 2rem;
    }

    .steps-list li::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.8rem;
    }
}

/* Button Styles */
.btn-discord {
    display: inline-block;
    background: rgba(96, 165, 250, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(96, 165, 250, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    text-align: center;
}

.btn-discord:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: var(--info-color);
    transform: none;
    box-shadow: 0 6px 18px rgba(96, 165, 250, 0.12);
}

.btn-discord:visited,
.btn-discord:link,
.btn-discord:active,
.btn-discord:focus {
    color: var(--info-color);
    text-decoration: none;
}

.btn-discord:hover,
.btn-discord:focus,
.btn-discord:active {
    color: var(--info-color);
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Print Styles */
@media print {

    .header-bar,
    .footer {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .docs-content {
        box-shadow: none;
        background-color: white;
    }
}