/* 
 * Accops HyWorks Documentation - Optimized CSS
 * Version: 2.0
 * Compatible with: MkDocs Material 9.7.0
 * Last Updated: December 2025
 */

/* ========================================================================
   MAIN LAYOUT OPTIMIZATION
   ======================================================================== */

/* Content area optimization */
.md-main__inner {
    display: flex;
    height: 100%;
    margin-top: 0.5rem;
}

/* Grid container - optimal reading width */
.md-grid {
    max-width: 80rem;
    margin-right: auto;
    margin-left: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ========================================================================
   SIDEBAR CONFIGURATION
   ======================================================================== */

/* Primary sidebar (left navigation) */
.md-sidebar--primary {
    width: 15rem;
}

/* Secondary sidebar (table of contents) */
.md-sidebar--secondary {
    width: 13rem;
    margin-top: 3.5%;
}

/* Content area with sidebars */
.md-content {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* ========================================================================
   FOOTER CUSTOMIZATION
   ======================================================================== */

/* Hide default footer metadata (Made with Material for MkDocs) */
.md-footer-meta {
    display: none;
}

/* Keep copyright footer visible */
.md-footer-copyright {
    display: block;
}

/* ========================================================================
   RESPONSIVE DESIGN
   ======================================================================== */

/* Tablet devices */
@media screen and (max-width: 76.1875em) {
    .md-sidebar--secondary {
        display: none;
    }
    
    .md-content {
        margin-right: 1rem;
    }
}

/* Mobile devices */
@media screen and (max-width: 60em) {
    .md-sidebar--primary {
        transform: translateX(-15rem);
    }
    
    .md-grid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ========================================================================
   CONTENT ENHANCEMENTS
   ======================================================================== */

/* Improved code block styling */
.highlight {
    margin: 1em 0;
    border-radius: 0.4em;
}

/* Better table styling */
.md-typeset table:not([class]) {
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 0.4em;
    overflow: hidden;
}

.md-typeset table:not([class]) th {
    background-color: var(--md-default-fg-color--lightest);
    font-weight: 600;
}

/* Admonition (callout) improvements */
.md-typeset .admonition {
    border-left: 4px solid;
    border-radius: 0.4em;
    margin: 1.5em 0;
    padding: 0.8em 1.2em;
}

/* ========================================================================
   NAVIGATION IMPROVEMENTS
   ======================================================================== */

/* Navigation tabs styling */
.md-tabs {
    background-color: var(--md-primary-fg-color);
}

/* Active navigation item highlight */
.md-nav__link--active {
    font-weight: 600;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* ========================================================================
   ACCOPS BRAND COLORS (Deep Orange Theme)
   ======================================================================== */

/* Primary accent for links */
.md-typeset a {
    color: #ff5722;
}

.md-typeset a:hover {
    color: #f4511e;
}

/* Button styling */
.md-typeset .md-button {
    background-color: #ff5722;
    border-color: #ff5722;
    color: white;
}

.md-typeset .md-button:hover {
    background-color: #f4511e;
    border-color: #f4511e;
}

/* ========================================================================
   SEARCH OPTIMIZATION
   ======================================================================== */

/* Search result highlighting */
.md-search-result__article--document {
    padding: 1em;
}

.md-search-result mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 0 0.2em;
    border-radius: 0.2em;
}

/* ========================================================================
   PRINT OPTIMIZATION
   ======================================================================== */

@media print {
    /* Hide navigation and sidebars when printing */
    .md-header,
    .md-tabs,
    .md-sidebar,
    .md-footer {
        display: none;
    }
    
    /* Full width content for printing */
    .md-content {
        margin: 0;
        max-width: 100%;
    }
    
    /* Page break handling */
    .md-typeset h1,
    .md-typeset h2,
    .md-typeset h3 {
        page-break-after: avoid;
    }
    
    .md-typeset pre,
    .md-typeset table {
        page-break-inside: avoid;
    }
}

/* ========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================================================== */

/* Focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #ff5722;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 1em;
    background-color: #ff5722;
    color: white;
    text-decoration: none;
}

.skip-to-content:focus {
    left: 0;
}

/* ========================================================================
   DARK MODE ADJUSTMENTS
   ======================================================================== */

[data-md-color-scheme="slate"] {
    /* Adjust code block background for better contrast */
    --md-code-bg-color: #1a1a1a;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ========================================================================
   CUSTOM CONTENT CLASSES
   ======================================================================== */

/* Highlight box for important information */
.highlight-box {
    background-color: #fff3cd;
    border-left: 4px solid #ff5722;
    padding: 1em;
    margin: 1em 0;
    border-radius: 0.4em;
}

[data-md-color-scheme="slate"] .highlight-box {
    background-color: rgba(255, 193, 7, 0.1);
}

/* Release notes badge styling */
.version-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1;
    color: white;
    background-color: #ff5722;
    border-radius: 0.3em;
    margin-left: 0.5em;
}

/* Status indicators */
.status-new {
    color: #4caf50;
    font-weight: 600;
}

.status-enhanced {
    color: #2196f3;
    font-weight: 600;
}

.status-fixed {
    color: #ff9800;
    font-weight: 600;
}

.status-deprecated {
    color: #f44336;
    font-weight: 600;
}

/* ========================================================================
   PERFORMANCE OPTIMIZATIONS
   ======================================================================== */

/* GPU acceleration for smooth animations */
.md-sidebar,
.md-header,
.md-tabs {
    will-change: transform;
    transform: translateZ(0);
}

/* Optimize image loading */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading support */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
