/* Mermaid diagram styling - remove grey backgrounds ONLY from Mermaid containers */
pre.mermaid {
    background: transparent !important;
    border: none !important;
    margin: 1.5rem auto !important;
    text-align: center !important;
    padding: 0 !important;
}

/* Ensure Mermaid diagrams are properly centered and clean */
pre.mermaid.align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    background: transparent !important;
}

/* Fix oversized navigation links at bottom of pages */
.prev-next-area .prev-next-info .prev-next-label {
    font-size: 0.9rem !important;
    font-weight: normal !important;
}

.prev-next-area .prev-next-info a {
    font-size: 1rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Ensure consistent navigation styling */
.prev-next-area {
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
    margin-top: 3rem;
}

.prev-next-area .prev-next-info {
    max-width: none !important;
}

/* Work-in-Progress Banner Styles - Construction Theme */
.wip-banner {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 25%, #ff9800 50%, #ffc107 100%);
    border-bottom: 3px solid #ff6f00;
    color: #000000;
    padding: 0.75rem 1rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25);
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: attention-pulse 4s ease-in-out infinite;
}

/* Add spacing after the banner */
.wip-banner + * {
    margin-top: 2.5rem !important;
}

.wip-banner.collapsed {
    padding: 0.5rem 1rem;
}

.wip-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;  /* Stack title and description vertically */
    flex-wrap: nowrap;
    gap: 0.25rem;
    padding-right: 3.5rem;  /* Space for buttons */
}

.wip-banner-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;  /* Reduced gap to prevent wrapping */
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;  /* Prevent text wrapping */
    flex-shrink: 0;  /* Don't shrink the title */
}

.wip-banner-title .icon {
    font-size: 1.2rem;
    animation: construction-blink 2s infinite ease-in-out;
}

.wip-banner-description {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
    transition: all 0.3s ease;
    color: #212121;
    font-weight: 500;
    max-width: 600px;
    flex-shrink: 1;  /* Allow description to shrink if needed */
    text-align: center;
}


.wip-banner.collapsed .wip-banner-description {
    display: none;
}

.wip-banner-toggle {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: #000000;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.375rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.8;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wip-banner-toggle:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.wip-banner-close {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: #000000;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.8;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.wip-banner-close:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.wip-banner.hidden {
    display: none;
}

@keyframes attention-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    }
}

@keyframes construction-blink {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { opacity: 0.8; transform: scale(0.95) rotate(0deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

/* Adjust banner when sidebar is expanded or on smaller screens */
@media (max-width: 1200px) {
    .wip-banner-title {
        font-size: 0.9rem;
    }

    .wip-banner-title .icon {
        font-size: 1rem;
    }

    .wip-banner-title span:nth-child(2),  /* Hide second icon */
    .wip-banner-title span:nth-child(4) {  /* Hide fourth icon */
        display: none;
    }
}

/* Mobile responsiveness for banner */
@media (max-width: 768px) {
    .wip-banner {
        padding: 0.625rem 0.75rem;
    }

    .wip-banner-content {
        flex-direction: column;  /* Stack vertically on mobile */
        gap: 0.25rem;
        padding-right: 3rem;
    }

    .wip-banner-title {
        font-size: 0.8rem;
        flex-wrap: nowrap;
    }

    .wip-banner-title span:nth-child(2),  /* Hide warning icon on mobile */
    .wip-banner-title span:nth-child(4),  /* Hide hammer icon on mobile */
    .wip-banner-title span:nth-child(5) {  /* Hide last construction icon */
        display: none;
    }

    .wip-banner-description {
        font-size: 0.7rem;
        margin: 0;
        line-height: 1.2;
    }

    .wip-banner-toggle {
        right: 2rem;
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }

    .wip-banner-close {
        right: 0.375rem;
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }
}