/* ===== components/graph.css ===== */

.graph-toggle-container {
    display: flex;
    justify-content: flex-start;
    margin: 8px 0 24px;
}

.graph-toggle-btn {
    min-height: 42px;
    padding: 9px 16px;
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.graph-toggle-btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.graph-modal .modal-container {
    width: min(94vw, 960px);
    max-width: 960px;
    height: min(82vh, 760px);
    max-height: 760px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 28px 32px 24px;
}

.graph-modal .modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.graph-modal__header {
    flex: 0 0 auto;
    margin-bottom: 16px;
}

.graph-modal__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.graph-modal__header h3 {
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
}

.graph-modal__description {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

#graphNetwork {
    flex: 1;
    min-height: 360px;
    height: 100%;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.graph-legend {
    flex: 0 0 auto;
    margin-top: 14px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.graph-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.graph-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.graph-legend-dot--node {
    background: var(--accent);
    border: 2px solid var(--accent);
}

.graph-legend-dot--edge {
    width: 24px;
    height: 2px;
    border-radius: 0;
    background: var(--accent);
    opacity: 0.35;
}

.graph-modal__actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.graph-modal__actions button {
    min-height: 42px;
    padding: 9px 16px;
}

.graph-empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .graph-modal .modal-container {
        width: calc(100vw - 24px);
        height: calc(100dvh - 24px);
        padding: 24px 18px 18px;
    }

    .graph-modal__header h3 {
        font-size: 1.55rem;
    }

    #graphNetwork {
        min-height: 280px;
    }
}
