/* ===== Gallery list (scoped) ===== */
.ItemGallery {
    font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

.ItemGallery__Header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.ItemGallery__Title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.ItemGallery__Status {
    font-size: 12px;
    opacity: 0.75;
}

.ItemGallery__List {
    border: 1px solid rgba(167, 199, 255, 0.18);
    background: rgba(11, 16, 32, 0.25);
    padding: 10px;
}

.ItemGallery__Row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(167, 199, 255, 0.10);
}

.ItemGallery__Row:last-child {
    border-bottom: none;
}

.ItemGallery__Open {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.ItemGallery__Tiny {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 1px solid rgba(167, 199, 255, 0.18);
    border-radius: 0;
    flex: 0 0 auto;
}

.ItemGallery__Name {
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 380px;
}

.ItemGallery__Date {
    font-size: 12px;
    opacity: 0.75;
    white-space: nowrap;
    flex: 0 0 auto;
}

.ItemGallery__Empty {
    font-size: 12px;
    opacity: 0.75;
}

/* ===== Modal gallery ===== */
.ItemGalleryModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 9999;
}

.ItemGalleryModal.open {
    display: flex;
}

.ItemGalleryModal__Panel {
    width: min(820px, 100%);
    background: rgba(15, 24, 51, 0.95);
    border: 1px solid rgba(167, 199, 255, 0.22);
    border-radius: 0;
    overflow: hidden;
}

.ItemGalleryModal__Top {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(167, 199, 255, 0.14);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.ItemGalleryModal__Title {
    font-size: 12px;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}

.ItemGalleryModal__Close {
    padding: 10px 12px;
    border-radius: 0;
    border: 1px solid rgba(248, 187, 208, 0.45);
    background: rgba(187, 167, 174, 0.836);
    color: inherit;
    cursor: pointer;
}

.ItemGalleryModal__Body {
    background: rgba(11, 16, 32, 0.35);
}

.ItemGalleryModal__MainWrap {
    border-bottom: 1px solid rgba(167, 199, 255, 0.14);
    background: rgba(11, 16, 32, 0.35);
}

.ItemGalleryModal__Main {
    display: block;
    width: 100%;
    max-height: 64vh;
    object-fit: contain;
    border-radius: 0;
}

.ItemGalleryModal__Thumbs {
    /* display: flex; */
    display: none;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
    background: rgba(11, 16, 32, 0.55);
}

.ItemGalleryModal__ThumbBtn {
    border: 1px solid rgba(167, 199, 255, 0.18);
    background: transparent;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.ItemGalleryModal__ThumbBtn.active {
    border-color: rgba(185, 246, 202, 0.6);
}

.ItemGalleryModal__ThumbImg {
    width: 72px;
    height: 72px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}