
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 50px auto auto;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: max-content;
    max-height: 85vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background-color: var(--esa-blue);
    color: var(--white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--esa-blue-light-light);
}

.modal-body {
    padding: var(--spacing-lg);
    color: var(--text-primary);
    overflow-y: auto;
    flex: 1;
}

/* .modal-body h3,
.modal-body h4 {
    color: var(--esa-blue);
}

.modal-body h3 {
    margin-top: 0;
}

.modal-body ul {
    margin-left: var(--spacing-lg);
}

.modal-body p {
    line-height: 1.6;
} */

/* .modal-large {
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
}

.modal-large .modal-body {
    max-height: 60vh;
}

.graph-modal .modal-content {
    max-width: 600px;
}

.graph-display-modal .modal-content {
    max-width: 90vw;
    max-height: 85vh;
    min-width: max-content;
}

.graph-display-modal .modal-body {
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
 */

.legend-section,
.interaction-section,
.symbol-section {
    margin-bottom: var(--spacing-lg);
}

.legend-item,
.interaction-item,
.symbol-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-xs) 0;
}

.legend-color {
    width: 30px;
    height: 20px;
    border: 1px solid var(--gray);
    margin-right: var(--spacing-md);
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-color.selected-reference {
    background-color: var(--esa-blue-light-light);
    border: 2px solid var(--esa-blue);
}

.symbol-icon,
.inline-icon {
    width: 16px;
    height: 16px;
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

/* .inline-icon {
    margin: 0 var(--spacing-xs);
    vertical-align: middle;
} */

.symbol-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(204deg) brightness(97%) contrast(97%);
}

.interaction-item {
    border-bottom: 1px solid #f0f0f0;
}

.interaction-item:last-child {
    border-bottom: none;
}

.interaction-item strong {
    color: var(--esa-blue);
    margin-right: var(--spacing-sm);
}



.graph-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-column {
    border-radius: 5px;
    padding: 15px;
    border: 1px solid var(--deep-space-2);
    min-width: 200px;
}

.stat-column h4 {
    margin: 0 0 10px 0;
    color: #335E6F;
    font-size: 16px;
    border-bottom: 2px solid #335E6F;
    padding-bottom: 5px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    padding: 3px 0;
}

.stat-label {
    font-weight: 600;
    color: #555;
}

.stat-value {
    color: #333;
    font-family: monospace;
}

.graph-controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

#graph-scope-container {
    margin-bottom: 20px;
}

.scope-selector {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    margin-bottom: 10px;
}

.scope-selector:hover {
    border-color: #335e6f;
}

.scope-selector:focus {
    outline: none;
    border-color: #335e6f;
    box-shadow: 0 0 0 3px rgba(51, 94, 111, 0.1);
}
