details.docx-thumbnails {
    position: relative;
    min-width: 1rem;
}

details.docx-thumbnails[open] {
    min-width: 120px;
}

details.docx-thumbnails summary {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 1rem;
    padding-left: 3px;
}

details.docx-thumbnails summary::marker {
    color: #a1a1aa;
}

.docx-thumbnails:empty {
    display: none;
}

.docx-thumbnails-container {
    height: 100%;
    overflow: auto;
    scrollbar-gutter: stable both-edges;
    padding: 0.25rem;
}

.docx-thumbnail-item {
    display: flex;
    background-color: white;
    text-decoration: none;
    color: #a1a1aa;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 500;
    aspect-ratio: 6 / 8;
    width: 100px;
    border: 1px solid #e4e4e7;
    border-radius: 4px;
    margin: 0.5rem auto;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docx-thumbnail-item:hover {
    border-color: #a1a1aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

:root.dark .docx-thumbnail-item {
    background-color: #27272a;
    color: #71717a;
    border-color: #3f3f46;
}

:root.dark .docx-thumbnail-item:hover {
    border-color: #52525b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

:root.dark details.docx-thumbnails summary::marker {
    color: #52525b;
}
