/* Shared layout for user and administrator attachment viewers. */
.attachment-gallery[open],.panel-attachment-dialog:not(.panel-archive-dialog)[open]{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden;box-sizing:border-box;overscroll-behavior:contain}
.attachment-gallery h2,.panel-attachment-dialog:not(.panel-archive-dialog) h2{flex-shrink:0;min-width:0;max-height:none;overflow:hidden;overflow-wrap:anywhere;line-height:1.4;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.attachment-gallery [data-stage],.panel-attachment-dialog [data-stage]{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
.attachment-gallery [data-stage] img,.attachment-gallery [data-stage] video,.panel-attachment-dialog [data-stage] img,.panel-attachment-dialog [data-stage] video{display:block;max-width:100%;max-height:calc(100dvh - 230px);object-fit:contain}
.attachment-gallery [data-stage] iframe,.panel-attachment-dialog [data-stage] iframe{height:calc(100dvh - 230px)}
.attachment-gallery-nav,.panel-gallery-nav,.attachment-gallery-footer,.panel-preview-footer{flex-shrink:0}
.attachment-gallery-nav button,.panel-gallery-arrow{min-width:44px;min-height:44px;touch-action:manipulation;cursor:pointer}
.attachment-gallery-footer button,.panel-preview-footer button{min-height:44px;touch-action:manipulation}
.attachment-gallery [data-error],.panel-attachment-dialog [data-preview-note]{flex-shrink:0;max-height:3rem;overflow:auto}
.request-preview-name{border:0;padding:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.request-preview-name:not(:disabled):hover,.request-preview-name:focus-visible{color:#67e2d8;text-decoration:underline;text-underline-offset:3px}
.request-preview-name:disabled{cursor:default}
@media(max-width:600px){
 .attachment-gallery,.panel-attachment-dialog:not(.panel-archive-dialog){width:calc(100vw - 16px);max-width:calc(100vw - 16px);padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom));border-radius:12px}
 .attachment-gallery[open],.panel-attachment-dialog:not(.panel-archive-dialog)[open]{max-height:calc(100dvh - 16px)}
 .attachment-gallery h2,.panel-attachment-dialog:not(.panel-archive-dialog) h2{font-size:1rem;line-height:1.35;margin-bottom:.75rem!important}
 .attachment-gallery-nav,.panel-gallery-nav{gap:.8rem;margin-top:.65rem}
 .attachment-gallery-footer,.panel-preview-footer{margin-top:.65rem}
 .request-photo-thumb{min-width:44px;min-height:44px}
 .request-preview-name{min-height:44px;white-space:normal;overflow-wrap:anywhere}
}
@media(max-height:500px){
 .attachment-gallery h2,.panel-attachment-dialog:not(.panel-archive-dialog) h2{-webkit-line-clamp:1;margin-bottom:.3rem!important}
 .attachment-gallery-nav,.panel-gallery-nav{margin-top:.25rem}
 .attachment-gallery-footer,.panel-preview-footer{margin-top:.25rem}
 .attachment-gallery [data-stage] img,.attachment-gallery [data-stage] video,.panel-attachment-dialog [data-stage] img,.panel-attachment-dialog [data-stage] video{max-height:calc(100dvh - 180px)}
}
