/* ============================================================
   PROJECT OVERTURE — file manager (v0)
   Companion sheet to overture.css; relies on the --ovt-* custom
   properties defined on .ovt-shell (OvertureLayout). All classes
   are ovtf-* to stay out of overture.css's namespace.
   ============================================================ */

.ovtf-body {
    flex: 1; min-height: 0;
    display: grid; grid-template-columns: minmax(300px, 34%) 1fr; gap: 0.8rem;
}

/* ------------------------------------------------------------
   left pane — directory tree
   ------------------------------------------------------------ */
.ovtf-tree {
    min-height: 0; display: flex; flex-direction: column;
    background: #050807;
    border: 1px solid var(--ovt-hairline); border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(16, 185, 129, 0.03);
}

.ovtf-crumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem;
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--ovt-hairline);
    background: rgba(6, 10, 8, 0.9);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.ovtf-crumb {
    appearance: none; cursor: pointer;
    background: transparent; border: none; padding: 0.15rem 0.25rem; border-radius: 2px;
    font-family: inherit; font-size: 0.68rem; letter-spacing: 0.04em;
    color: var(--ovt-violet); /* violet = files/audit accent */
    transition: background 0.15s ease, color 0.15s ease;
}
.ovtf-crumb:hover { background: rgba(196, 181, 253, 0.1); color: var(--ovt-fg); }
.ovtf-crumb-sep { color: var(--ovt-fg-dim); font-size: 0.68rem; user-select: none; }

.ovtf-list {
    flex: 1; min-height: 0; overflow-y: auto;
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.72rem;
    scrollbar-width: thin; scrollbar-color: rgba(16, 185, 129, 0.35) rgba(5, 8, 7, 0.9);
}
.ovtf-list::-webkit-scrollbar { width: 8px; }
.ovtf-list::-webkit-scrollbar-track { background: rgba(5, 8, 7, 0.9); }
.ovtf-list::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3); border-radius: 4px; border: 2px solid #050807;
}

.ovtf-row {
    appearance: none; cursor: pointer; width: 100%; text-align: left;
    display: grid; grid-template-columns: 1fr 5.2em 9.5em; gap: 0.6rem; align-items: baseline;
    padding: 0.28rem 0.7rem;
    background: transparent; border: none; border-left: 2px solid transparent;
    font-family: inherit; font-size: inherit; color: var(--ovt-fg-muted);
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.ovtf-row:hover {
    background: rgba(196, 181, 253, 0.06); color: var(--ovt-fg);
    border-left-color: rgba(196, 181, 253, 0.35);
}
.ovtf-row.is-selected {
    background: rgba(196, 181, 253, 0.1); color: var(--ovt-fg);
    border-left-color: var(--ovt-violet);
}
.ovtf-row.is-dir .ovtf-col-name { color: var(--ovt-violet); }
.ovtf-row.is-dir .ovtf-glyph { color: rgba(196, 181, 253, 0.7); }
.ovtf-row.is-bak { opacity: 0.45; }

.ovtf-row-head {
    cursor: default; position: sticky; top: 0; z-index: 1;
    background: #060a08; border-bottom: 1px solid var(--ovt-hairline);
    color: var(--ovt-fg-dim); font-size: 0.58rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    padding-top: 0.4rem; padding-bottom: 0.4rem;
}

.ovtf-col-name {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: flex; align-items: baseline; gap: 0.35rem;
}
.ovtf-glyph {
    color: rgba(196, 181, 253, 0.35); flex-shrink: 0; user-select: none;
    display: inline-block; width: 1em; text-align: center;
}
.ovtf-col-size {
    text-align: right; color: var(--ovt-fg-dim); font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
}
.ovtf-col-mod {
    color: var(--ovt-fg-dim); font-size: 0.66rem; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ovtf-tag {
    flex-shrink: 0; padding: 0.05rem 0.35rem; border-radius: 2px;
    font-size: 0.54rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ovt-cyan); border: 1px solid rgba(103, 232, 249, 0.35);
    background: rgba(103, 232, 249, 0.06);
}
.ovtf-tag.is-lock {
    color: var(--ovt-amber); border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.06);
}

/* ------------------------------------------------------------
   right pane — viewer / editor
   ------------------------------------------------------------ */
.ovtf-editor {
    min-height: 0; display: flex; flex-direction: column;
    background: #050807;
    border: 1px solid var(--ovt-hairline); border-radius: 6px;
    overflow: hidden; position: relative; isolation: isolate;
    box-shadow: inset 0 0 60px rgba(16, 185, 129, 0.04), 0 6px 30px rgba(0, 0, 0, 0.45);
}

.ovtf-editor-head {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--ovt-hairline);
    background: rgba(6, 10, 8, 0.9);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.ovtf-editor-path {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 0.7rem; color: var(--ovt-fg);
}
.ovtf-editor-meta { flex-shrink: 0; font-size: 0.62rem; color: var(--ovt-fg-dim); letter-spacing: 0.04em; }
.ovtf-editor-actions { margin-left: auto; display: flex; gap: 0.4rem; flex-shrink: 0; }

.ovtf-viewer {
    flex: 1; min-height: 0; margin: 0; overflow: auto;
    padding: 0.8rem 0.9rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.74rem; line-height: 1.45; color: #E1E3E8;
    white-space: pre; tab-size: 4;
    scrollbar-width: thin; scrollbar-color: rgba(196, 181, 253, 0.3) rgba(5, 8, 7, 0.9);
}

.ovtf-textarea {
    flex: 1; min-height: 0; resize: none;
    padding: 0.8rem 0.9rem;
    background: rgba(6, 10, 8, 0.7); border: none; outline: none;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.74rem; line-height: 1.45; color: #E1E3E8;
    caret-color: var(--ovt-violet); tab-size: 4; white-space: pre;
    scrollbar-width: thin; scrollbar-color: rgba(196, 181, 253, 0.3) rgba(5, 8, 7, 0.9);
}
.ovtf-textarea:focus { box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.4); }
.ovtf-textarea:disabled { opacity: 0.5; }

/* ------------------------------------------------------------
   notices
   ------------------------------------------------------------ */
.ovtf-notice {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.68rem; letter-spacing: 0.04em;
    color: rgba(225, 227, 232, 0.45);
}
.ovtf-notice.is-error { color: var(--ovt-amber); }

.ovtf-center-notice {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 0.5rem;
    padding: 1.5rem; text-align: center;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.72rem; letter-spacing: 0.05em;
    color: rgba(225, 227, 232, 0.4);
}
.ovtf-center-notice.is-error { color: var(--ovt-amber); }
.ovtf-center-path { font-size: 0.64rem; color: var(--ovt-fg-dim); }

/* ------------------------------------------------------------
   responsive
   ------------------------------------------------------------ */
@media (max-width: 1100px) {
    .ovtf-body { grid-template-columns: 1fr; grid-template-rows: minmax(180px, 38%) 1fr; }
}
