/* Tree previews and the editor share these rules in tools and result reports. */
.tree-preview-zoom { width: 150px; vertical-align: middle; }
.tree-preview-viewport { max-height: 700px; overflow: auto; border: 1px solid #aaa; }
.tree-preview-viewport .tree-preview-image { display: block; width: 100%; max-width: none; height: auto; }
[data-atv-editor] [data-atv-node] { max-width: 100%; }
[data-atv-editor] [data-atv-viewport] { overflow: auto; max-height: 600px; border: 1px solid #999; background: white; }
[data-atv-editor] [data-atv-comments],
[data-atv-editor] [data-atv-taxa] { white-space: pre-wrap; }

[data-atv-editor] [data-selected-node] use {
    stroke: #b00000;
    stroke-width: 2px;
}
[data-atv-editor] [data-search-match] use {
    stroke: #c00000 !important;
    fill: #c00000 !important;
}
[data-atv-editor] [data-atv-canvas] svg {
    display: block;
    width: 100%;
    height: auto;
}
[data-atv-editor] details {
    margin: 0.6em 0;
}
[data-atv-editor] [data-atv-status] {
    min-height: 1.4em;
}
[data-atv-editor] a[download] {
    margin-right: 1em;
}
[data-atv-editor] [data-atv-domain-controls] {
    text-align: left;
}
[data-atv-editor] [data-atv-domain-controls] input[type="number"] {
    display: inline-block;
    width: 6em;
    margin: 0 0.5em;
    vertical-align: baseline;
}
[data-atv-editor] [data-atv-domain-controls] label {
    display: inline;
}
[data-atv-editor] [data-atv-presentation-details] input[type="color"] {
    display: inline-block;
    width: 4em;
    height: 2em;
    vertical-align: middle;
}
[data-atv-editor] [data-atv-presentation-details] input[type="checkbox"] {
    width: auto;
}

/* Reuse the standalone form columns without restricting the tree viewport. */
.standalone-tool-page [data-atv-edit-details] > .legacy-form-grid {
    display: block;
}
.standalone-tool-page [data-atv-editor] .atv-inline-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
.standalone-tool-page [data-atv-editor] .atv-inline-controls > label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.standalone-tool-page [data-atv-editor] .atv-display-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    max-width: var(--tool-form-width);
}
.standalone-tool-page [data-atv-editor] .atv-display-options > label {
    display: flex;
    align-items: center;
    gap: 6px;
}
.standalone-tool-page [data-atv-editor] .atv-display-options input {
    margin: 0;
    flex-shrink: 0;
}
.standalone-tool-page [data-atv-editor] [data-atv-domain-controls] input[type="number"] {
    margin: 0;
}
@media (max-width: 680px) {
    .standalone-tool-page [data-atv-editor] .atv-display-options {
        grid-template-columns: minmax(0, 1fr);
    }
}
