/* THIS FILE IS COPIED FROM THE COMMON LIBRARY AS OF 2025-09-30 11:14:35 GMT. DO NOT EDIT THIS FILE. EDIT THE ORIGINAL IN THE COMMON LIBRARY INSTEAD. */
.attachment-icon {
    font-size: 1rem;
    text-align: center;
    display: inline-block;
    user-select: none;
    padding: 4px;
    border-radius: 8px;
    transition: 0.3s;
    width: 80px;
    outline: solid 2px transparent;
    outline-offset: 0px;
    position: relative;
}
.attachment-icon ~ .attachment-icon {
    margin-left: 4px;
}
.attachment-icon-thumbnail {
    font-size: 60px;
    cursor: pointer;
    position: relative;
    width: 100%;
}
.attachment-icon-thumbnail > img {
    height: 1em;
    width: 100%; 
    object-fit: contain;
}
.attachment-icon-thumbnail-magnify {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    font-size: 30px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    color: gray;
}
.attachment-icon-thumbnail:hover .attachment-icon-thumbnail-magnify {
    opacity: 1;
    visibility: visible;
}
.attachment-icon-filename {
    font-size: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}
.attachment-icon-size {
    font-size: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}
.attachment-icon-created {
    font-size: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}
.attachment-icon-controls {
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    white-space: nowrap;
    padding: 4px 0 0 0;
}
.attachment-icon.hover {
    outline-color: var(--primary-color);
}
.attachment-icon.hover .attachment-icon-controls {
    opacity: 1;
    visibility: visible;
}



page-ajax.attachment-preview-page {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}
page-ajax.attachment-preview-page div[slot="body"] {
    _overflow: hidden;
    padding: 8px;
}
.attachment-preview {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.attachment-preview-controls {
    text-align: center;
    padding: 8px;
}
.attachment-preview-controls > * ~ * { 
    margin-left: 16px;
}
.attachment-preview-content-wrapper {
    overflow: auto;
    flex-grow: 1;
    background-color: color-mix(in srgb, var(--primary-color), white 75%);
    padding: 16px;
    border: solid 2px gray;
}
.attachment-preview-content { 
    background: white;
    opacity: 1;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.2;
}
.attachment-preview-content img { 
    margin: auto;
}
.attachment-preview-content > :is(video, audio) {
    display: inline-block;
}



/* Images */
.attachment-preview-content img {
    object-fit: contain;
    height: 100%;
    width: 100%;
}


/* Preview: Outlook (.msg) */
.attachment-preview-content.msg {
    text-align: left;
    padding: 1em;
}
.attachment-preview-content.msg > :is(.header, .body) {
    border-radius: 8px;
    padding: 8px;
}
.attachment-preview-content.msg > .body {
    border: solid 2px gray;
}
.attachment-preview-content.msg > .header table {
    width: 100%;
    border-collapse: collapse;
}
.attachment-preview-content.msg > .header table :is(td, th) {
    text-align: left;
    padding: 2px;
}
.attachment-preview-content.msg > .body {
    margin-top: 8px;
}
.attachment-preview-content.msg > .header table tr :first-child {
    padding-right: 8px;
}
.attachment-preview-content.msg > .header table tr :nth-child(2) {
    width: 100%;
}



/* Preview: Excel (.xlsx) */
.attachment-preview-content.xlsx {
    text-align: left;
    padding: 1em;
    height: 100%;
}
.attachment-preview-content.xlsx table {
    width: 100%;
    border-collapse: collapse;
}
.attachment-preview-content.xlsx td {
    _border: solid 2px gray;
}
.attachment-preview-content.xlsx .text-align-left {
    text-align: left;
}
.attachment-preview-content.xlsx .text-align-center {
    text-align: center;
}
.attachment-preview-content.xlsx .text-align-right {
    text-align: right;
}
.attachment-preview-content.xlsx .vertical-align-top {
    vertical-align: top;
}
.attachment-preview-content.xlsx .vertical-align-middle {
    vertical-align: middle;
}
.attachment-preview-content.xlsx .vertical-align-bottom {
    vertical-align: bottom;
}
.attachment-preview-content.xlsx .font-weight-bold {
    font-weight: bold;
}



/* Preview: XML */
.attachment-preview-content.xml {
    text-align: left;
    padding: 1em;
}



/* Preview: TXT */
.attachment-preview-content.txt {
    text-align: left;
    padding: 1em;
    font-family: monospace;
}



/* Preview: Word (.docx) */
.attachment-preview-content.docx {
    text-align: left;
    padding: 1em;
    _background: inherit;
}
.attachment-preview-content.docx .page {
    background: white;
    display: grid;
    position: relative;
    margin: 0 auto;
    border: solid 2px gray;
    
    grid-template-areas:
        "header"
        "body"
        "footer";

    grid-template-rows:
        calc(var(--header-height-twips, 720) / 1440 * 1in)
        auto
        calc(var(--footer-height-twips, 720) / 1440 * 1in);

    width: calc(var(--page-width-twips, 12240) / 1440 * 1in);
    height: calc(var(--page-height-twips, 15840) / 1440 * 1in);

    padding-left: calc(var(--margin-left-twips, 1440) / 1440 * 1in);
    padding-right: calc(var(--margin-right-twips, 1440) / 1440 * 1in);
    padding-top: calc(var(--margin-top-twips, 1440) / 1440 * 1in);
    padding-bottom: calc(var(--margin-bottom-twips, 1440) / 1440 * 1in);

    direction: var(--text-direction, ltr);
}



/*
.attachment-preview-content.docx p {
    min-height: 1em;
}
.attachment-preview-content.docx .word-paragraph.align-left { text-align: left; }
.attachment-preview-content.docx .word-paragraph.align-right { text-align: right; }
.attachment-preview-content.docx .word-paragraph.align-center { text-align: center; }
.attachment-preview-content.docx .word-paragraph.align-justify { text-align: justify; }
.attachment-preview-content.docx .list-number {
    margin-right: 0.5em;
    font-weight: normal;
}
.attachment-preview-content.docx ol,
.attachment-preview-content.docx ul {
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
}
*/
