#filePreview { box-sizing: border-box; position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; padding: 12px; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); overflow: hidden; }
#filePreview[open] { display: flex; flex-direction: column; gap: 8px; }
body:has(#filePreview[open]) { overflow: hidden; }
#filePreview .panelHead { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
#filePreview .panelHead > div { min-width: 0; }
#filePreview .eyebrow { margin: 0 0 3px; }
#previewTitle { max-width: none; margin: 0; font-size: clamp(16px, 2vw, 23px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#previewClose { flex: 0 0 auto; margin: 0; min-height: 44px; }
#previewMeta, #previewStatus { flex: 0 0 auto; margin: 0; font-size: 12px; line-height: 1.35; }
#previewMeta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#previewStatus { max-height: 3em; overflow: auto; }
#previewBody { flex: 1 1 0; min-height: 0; min-width: 0; width: 100%; display: block; overflow: auto; border-radius: 4px; }
#previewBody[data-kind="image"], #previewBody[data-kind="video"], #previewBody[data-kind="audio"] { display: flex; align-items: center; justify-content: center; overflow: hidden; }
#previewBody img, #previewBody video { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; margin: 0; }
#previewBody audio { width: min(800px, 95%); margin: 0; }
#previewBody embed, #previewBody iframe { width: 100%; height: 100%; max-height: none; border: 0; }
#previewBody pre { box-sizing: border-box; width: 100%; min-height: 100%; max-height: none; margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
#previewBody .pdfViewer, #previewBody .officeViewer { box-sizing: border-box; width: 100%; height: 100%; max-height: none; min-height: 0; padding: 8px; overflow: auto; }
#previewBody .pdfViewer .actions { z-index: 1; margin: 0; flex-wrap: wrap; }
#previewBody canvas.pdfPage { width: auto; max-width: 100%; height: auto; margin: 8px auto; }
#previewBody .officeViewer:has(.sheetGrid) { display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
#previewBody .sheetGrid { flex: 1 1 0; min-height: 0; max-height: none; }
#previewBody .officeViewer > p { margin: 0; }
#previewBody .wordPage { min-height: 100%; box-sizing: border-box; }
#filePreview .previewNavigation { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px; padding-top: 4px; border-top: 1px solid #334b60; }
#filePreview .previewNavigation button { min-height: 44px; margin: 0; width: auto; }
#previewPrevious { justify-self: start; }
#previewNext { justify-self: end; }
#previewPosition { text-align: center; font-size: 13px; }
@media (max-width: 600px) { #filePreview[open] { gap: 5px; } #filePreview .eyebrow { display: none; } #previewBody .wordPage { padding: 14px; } #filePreview .previewNavigation { gap: 5px; } #filePreview .previewNavigation button { padding: 9px 10px; font-size: 13px; } #previewPosition { font-size: 11px; } }
@media (max-height: 480px) { #filePreview[open] { gap: 3px; } #filePreview .eyebrow, #previewMeta { display: none; } #previewTitle { font-size: 16px; } #previewStatus { max-height: 1.4em; } }
