/* Mermaid Diagram Stylesheet for Intelligent Textbooks
   This CSS has been modified to be used in an iframe placed in a mkdocs center column
   See style-fancy.css for ornate designs
   The background has been changed to aliceblue to let the user know
   it contains interactive elements like tooltips
   */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --background-color: aliceblue;
    --text-color: black;
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 0;
    padding-bottom: 0;
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0;
    font-weight: 700;
    line-height: 1.2;
}

.subtitle {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 400;
    margin-top: 0;
}

main {
    background: aliceblue;
    padding: 0;
}

.diagram-container {
    background: aliceblue;

    padding: 0pt;
    margin-bottom: 3pt;
    overflow-x: auto;
}

.mermaid {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* Ensure Mermaid diagram text is 16px */
.mermaid svg {
    max-width: 100%;
    height: auto;
}

.mermaid .node text,
.mermaid .edgeLabel text {
    font-size: 16px !important;
}

/* Make arrows 2x larger */
.mermaid .flowchart-link {
    stroke-width: 4px !important;
}

.mermaid marker {
    transform: scale(2);
}

.mermaid marker path {
    stroke-width: 1px;
}

.description {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.description h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.description p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.8;
}

footer {
    text-align: center;
    margin-top: 3pt;
    padding-top: 2pt;
    border-top: 1px solid var(--border-color);
    color: #6c757d;
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    main {
        padding: 1px;
    }

    .diagram-container {
        padding: 1px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    main {
        box-shadow: none;
    }

    footer {
        display: none;
    }
}
