/* Mermaid Diagram Stylesheet */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 400;
}

main {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.diagram-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

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

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

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

/* Swimlane (subgraph) alignment - align all at the top */
.mermaid .clusters rect {
    vertical-align: top !important;
}

.mermaid g.cluster {
    vertical-align: top !important;
}

/* Make swimlane names larger 30pt */
.mermaid .cluster-label text,
.mermaid .clusterLabel text,
.mermaid g.cluster > text {
    font-size: 30px !important;
    font-weight: 700 !important;
}

.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: 3rem;
    padding-top: 2rem;
    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: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    main {
        padding: 1rem;
    }

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

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

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

    main {
        box-shadow: none;
    }

    footer {
        display: none;
    }
}
