/* Owlograf app styles — uses --ctp-* variables from dolfin-suite.css */

.og-main {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    color: var(--ctp-text);
}

.og-main h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Graph fills everything below the 48px .dn-bar. */
.og-graph {
    height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: var(--graph-bg);
}

.og-pad {
    padding: 1.5rem;
}

/* SvgGraph wrapper: keep the flex fill of .og-graph. */
.og-graph-host {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Shift held: dim the graph so the lens stands out. */
.og-dimmed {
    opacity: 0.35;
    transition: opacity 0.12s;
}

.og-lens .dolfin-node {
    cursor: pointer;
}

/* Back/forward beside the graph's View button; same look. */
.og-nav-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    background: var(--graph-reset-bg);
    border: 1px solid var(--graph-reset-border);
    color: var(--graph-reset-text);
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.og-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.og-nav-btn[aria-pressed="true"] {
    background: var(--ctp-blue);
    border-color: var(--ctp-blue);
    color: var(--ctp-base);
}

/* Shift+hover lens: mini graph of a node and its neighbours. */
.og-lens {
    position: fixed;
    z-index: 1001;
    overflow: hidden;
    background: var(--ctp-mantle);
    border: 1px solid var(--ctp-overlay1);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* Graph edit dialog (create / edit / delete). */
.og-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
}

.og-modal {
    width: 90%;
    max-width: 560px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: var(--ctp-text);
    background: var(--ctp-base);
    border: 1px solid var(--ctp-surface1);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.og-modal h3 {
    margin: 0;
}

.og-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85em;
    color: var(--ctp-subtext1);
}

.og-field input,
.og-source {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.6rem;
    font-size: 0.9em;
    color: var(--ctp-text);
    background: var(--ctp-surface0);
    border: 1px solid var(--ctp-surface1);
    border-radius: 4px;
}

.og-source {
    min-height: 12em;
    font-family: var(--font-mono, monospace);
    resize: vertical;
}

.og-modal-error {
    font-size: 0.85em;
    white-space: pre-wrap;
}

.og-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.btn-primary.og-danger {
    color: var(--ctp-base);
    background: var(--ctp-red);
    border-color: var(--ctp-red);
}

/* Edit warnings / errors, bottom-center over the graph. */
.og-notice {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    max-width: min(640px, calc(100vw - 32px));
    padding: 0.6rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9em;
    color: var(--ctp-text);
    background: var(--ctp-mantle);
    border: 1px solid var(--ctp-overlay1);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.og-notice button {
    border: none;
    background: none;
    color: var(--ctp-subtext0);
    font-size: 1.1em;
    cursor: pointer;
}
