.file-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-in-out;
}

.file-preview-form {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;   
    min-width: 90%;
    min-height: 90%; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #ccc;
}

.file-preview-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ccc;
}

.file-preview-filename {
    margin: auto;
}

.file-preview-content {
    width: 100%;
    flex-grow: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: auto; 
}

/* Image inside Modal */
.file-preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
    animation: zoomIn 0.3s ease-in-out;    
    object-fit: contain;
}

/* Pre inside Modal */
.file-preview pre {
    flex-grow: 1; 
    width: 100%; 
    height: 100%; 
    resize: both;
    white-space: pre-wrap;
    text-align: left;
    margin: 5px;
}

/* Pdf inside Modal */
#file-preview-pdf {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;    
}

#file-preview-pdf canvas {
    margin-bottom: 10px; 
    border: 1px solid #ccc;
}

#file-preview-pdf canvas:first-of-type {
    margin-top: 10px;
}

.pdf-background {
    background-color: #e6e6e6;
}

/* Close Button */
.file-preview-close {
    margin-left: auto;
    margin-bottom: 5px;
    margin-right: 5px;
    margin-top: 5px;
    min-width: 40px;
    min-height: 40px;
}

.file-preview-close:hover {
    background-color: #f00;
    color: #fff;
}

.file-preview-toolbutton {
    min-width: 24px;
    min-height: 24px;
    margin: 2px;
    border-radius: 5px 5px 5px 5px;
    border: 1px solid #ccc;
    background-color: #068dcd;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}
.file-preview-toolbutton:hover {
    background-color: #06aef1;
}
.file-preview-toolbutton:active {
    background-color: #18b9f8;
}
.file-preview-toolbutton.disabled{
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
    pointer-events: none;
    background-blend-mode: luminosity;
}
.file-preview-toolbutton.large {
    min-width: 32px;
    min-height: 32px;
    margin: 5px;
}
.file-preview-toolbutton.zoom-in {
    background-image:url(/images/zoom_in.png);
    margin-left: 0px;
}
.file-preview-toolbutton.zoom-out {
    background-image:url(/images/zoom_out.png);
}
.file-preview-toolbutton.close {
    background-image:url(/images/close.png);
}


.f_pdf {
    background-image:url(/Orders/images/32/pdf.png);
}
.f_doc {
    background-image:url(/Orders/images/32/doc.png);    
}
.f_jpg {
    background-image:url(/Orders/images/32/jpg.png);    
}
.f_png {
    background-image:url(/Orders/images/32/png.png);    
}
.f_bmp {
    background-image:url(/Orders/images/32/bmp.png);    
}
.f_xls {
    background-image:url(/Orders/images/32/xls.png);    
}
.f_gif {
    background-image:url(/Orders/images/32/gif.png);    
}
.f_txt {
    background-image:url(/Orders/images/32/txt.png);    
}
.f_unknown {
    background-image:url(/Orders/images/32/_blank.png); 
}
