﻿.zt-attachment-preview-modal { z-index:1085; }
.zt-attachment-preview-modal .modal-dialog { height:min(92vh,980px); max-width:min(1440px,calc(100vw - 2rem)); }
.zt-attachment-preview-modal .modal-content { height:100%; }
.zt-attachment-preview-modal .modal-body { min-height:0; padding:0; background:var(--bs-body-bg); }
.zt-attachment-preview-toolbar { gap:.5rem; min-width:0; }
.zt-attachment-preview-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.zt-attachment-preview-count { white-space:nowrap; }
.zt-attachment-preview-content { height:100%; min-height:0; display:flex; flex-direction:column; overflow:hidden; color:var(--bs-body-color); background:var(--bs-body-bg); }
.zt-attachment-preview-content > iframe,.zt-attachment-preview-content > video { width:100%; flex:1; min-height:0; border:0; }
.zt-attachment-preview-content > audio { width:min(90%,680px); margin:auto; }
.zt-attachment-preview-message { margin:auto; padding:1.5rem; color:var(--bs-secondary-color); text-align:center; }
.zt-file-preview-document { display:flex; flex-direction:column; min-height:0; flex:1; }
.zt-file-preview-tools { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; padding:.75rem 1rem; border-bottom:1px solid var(--bs-border-color); flex-shrink:0; background:var(--bs-tertiary-bg); }
.zt-file-preview-tools .form-check { padding-left:0; font-size:.875rem; }
.zt-file-preview-tools .form-check-input { margin-left:0; flex-shrink:0; border-color:var(--bs-secondary-color); }
.zt-file-preview-search { max-width:22rem; min-width:12rem; flex:1; }
.zt-file-preview-tools select { max-width:25rem; }
.zt-file-preview-notice { padding:.65rem 1rem; border-bottom:1px solid var(--bs-border-color); background:var(--bs-warning-bg-subtle); color:var(--bs-warning-text-emphasis); }
.zt-file-preview-source { display:flex; flex-direction:column; min-height:0; overflow:auto; flex:1; }
.zt-file-preview-source summary { cursor:pointer; border-bottom:1px solid var(--bs-border-color); color:var(--bs-secondary-color); }
.zt-file-preview-lines { padding:.5rem 0; min-width:100%; font:13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; }
.zt-file-preview-line { display:flex; min-width:max-content; }
.zt-file-preview-number { user-select:none; width:4.5rem; flex-shrink:0; padding:0 .85rem; text-align:right; color:var(--bs-secondary-color); border-right:1px solid var(--bs-border-color); }
.zt-file-preview-line code { display:block; padding:0 1rem; white-space:pre; color:inherit; font:inherit; }
.zt-preview-wrap .zt-file-preview-line { min-width:0; }
.zt-preview-wrap code { white-space:pre-wrap; overflow-wrap:anywhere; min-width:0; }
.zt-preview-keyword { color:#2455aa; font-weight:600; }
.zt-preview-string { color:#8b4120; }
.zt-preview-number { color:#6750a4; }
.zt-preview-comment { color:#527354; }
[data-bs-theme="dark"] .zt-preview-keyword { color:#91b9ff; }
[data-bs-theme="dark"] .zt-preview-string { color:#e9b18f; }
[data-bs-theme="dark"] .zt-preview-number { color:#c5acf6; }
[data-bs-theme="dark"] .zt-preview-comment { color:#a4c2a7; }
.zt-file-preview-line mark { padding:0; color:#252000; background:#ffe680; }
.zt-file-preview-table { overflow:auto; min-height:0; flex:1; padding:1rem; }
.zt-file-preview-table td { min-width:8rem; max-width:30rem; white-space:pre-wrap; overflow-wrap:anywhere; }
.zt-file-preview-table tbody th,.zt-file-preview-table thead th:first-child { width:3rem; min-width:3rem; text-align:right; }
.zt-file-preview-table thead th { text-align:left; }
.zt-file-preview-image { min-height:0; flex:1; display:flex; overflow:auto; align-items:center; justify-content:center; padding:1rem; }
.zt-file-preview-image img { max-height:100%; max-width:100%; object-fit:contain; }
.zt-file-preview-image.zt-preview-actual { display:block; }
.zt-file-preview-image.zt-preview-actual img { max-width:none; max-height:none; }
@media(max-width:575px) {
 .zt-attachment-preview-modal .modal-dialog { max-width:calc(100vw - 1rem); height:calc(100dvh - 1rem); margin:.5rem; }
 .zt-attachment-preview-modal .modal-header { padding:.75rem; }
 .zt-file-preview-tools { padding:.65rem; gap:.65rem; }
 .zt-file-preview-search { max-width:none; flex-basis:100%; }
 .zt-file-preview-table { padding:.5rem; }
 .zt-file-preview-number { width:3rem; padding:0 .5rem; }
}

.zt-preview-select { position:relative; max-width:25rem; width:100%; }
.zt-preview-select select { appearance:none; background-image:none; }
.zt-preview-select::after,.zt-preview-chevron { position:absolute; right:1rem; top:50%; width:.45rem; height:.45rem; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-70%) rotate(45deg); pointer-events:none; }
.zt-preview-select:has(.zt-preview-chevron)::after { display:none; }

.zt-preview-log-date { color:#186575; }
.zt-preview-log-info { color:#2455aa; font-weight:600; }
.zt-preview-log-warning { color:#865200; font-weight:600; }
.zt-preview-log-error { color:#b12632; font-weight:600; }
.zt-preview-log-success { color:#236c35; font-weight:600; }
.zt-preview-log-debug { color:#5e6875; }
[data-bs-theme="dark"] .zt-preview-log-date { color:#85c8d5; }
[data-bs-theme="dark"] .zt-preview-log-info { color:#91b9ff; }
[data-bs-theme="dark"] .zt-preview-log-warning { color:#f1c66d; }
[data-bs-theme="dark"] .zt-preview-log-error { color:#ff9da6; }
[data-bs-theme="dark"] .zt-preview-log-success { color:#99d2a4; }
[data-bs-theme="dark"] .zt-preview-log-debug { color:#b2bac7; }
