/**
 * Markov Graph Visualizer Styles
 * Supports both light (bluegold) and dark (gruvbox-dark) themes
 */

/* Graph color variables - light theme (bluegold) */
:root, [data-theme="gruvbox-light"] {
    --graph-node-color: #002b5c;       /* Notre Dame blue */
    --graph-node-hover: #b18d03;       /* Notre Dame gold */
    --graph-edge-color: #999999;
    --graph-edge-hover: #b18d03;
    --graph-label-color: #555555;
    --graph-background: #f8f9fa;
}

/* Graph color variables - dark theme (gruvbox) */
[data-theme="gruvbox-dark"] {
    --graph-node-color: #83a598;       /* Gruvbox aqua */
    --graph-node-hover: #d65d0e;       /* Gruvbox orange */
    --graph-edge-color: #665c54;
    --graph-edge-hover: #fe8019;
    --graph-label-color: #ebdbb2;
    --graph-background: #282828;
}

/* Graph container */
#graph-container {
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--graph-background);
    margin-top: 15px;
    margin-bottom: 15px;
}

#sigma-container {
    width: 100%;
    height: 100%;
}

/* Loading indicator */
#loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--graph-background);
    z-index: 100;
    color: var(--graph-label-color);
}

#loading-indicator p {
    margin-top: 15px;
    font-size: 14px;
}

/* Placeholder */
#graph-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

#graph-placeholder p {
    margin-top: 15px;
    font-size: 14px;
}

/* Controls styling */
#controls {
    margin-bottom: 10px;
}

#controls .btn-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
}

#controls .btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0b5ed7;
}

/* Graph info bar */
#graph-info {
    margin-top: 10px;
}

#hover-info {
    font-style: italic;
    color: #666;
}

/* Dark theme overrides */
[data-theme="gruvbox-dark"] #graph-container {
    border-color: #504945;
}

[data-theme="gruvbox-dark"] #graph-placeholder {
    color: #665c54;
}

[data-theme="gruvbox-dark"] #hover-info {
    color: #928374;
}

[data-theme="gruvbox-dark"] #controls .btn.active {
    background-color: #83a598;
    border-color: #83a598;
    color: #282828;
}

[data-theme="gruvbox-dark"] #controls .btn-default {
    background-color: #3c3836;
    border-color: #504945;
    color: #ebdbb2;
}

[data-theme="gruvbox-dark"] #controls .btn-default:hover {
    background-color: #504945;
    border-color: #665c54;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #graph-container {
        height: 50vh;
        min-height: 300px;
    }

    #controls .btn-group {
        width: 100%;
        justify-content: center;
    }

    #controls .form-group {
        margin-bottom: 10px;
    }
}

/* Panel styling for usage info */
.panel-default > .panel-heading {
    cursor: pointer;
}

.panel-default > .panel-heading:hover {
    background-color: #f5f5f5;
}

[data-theme="gruvbox-dark"] .panel-default > .panel-heading {
    background-color: #3c3836;
    border-color: #504945;
    color: #ebdbb2;
}

[data-theme="gruvbox-dark"] .panel-default > .panel-heading:hover {
    background-color: #504945;
}

[data-theme="gruvbox-dark"] .panel-default {
    border-color: #504945;
}

[data-theme="gruvbox-dark"] .panel-body {
    background-color: #282828;
    color: #ebdbb2;
}

[data-theme="gruvbox-dark"] .panel-body pre {
    background-color: #1d2021;
    border-color: #504945;
    color: #ebdbb2;
}
