/* ========== 作品全屏看图（管理端瀑布流 + H5 详情弹窗共用） ========== */
body.artwork-lightbox-open {
    overflow: hidden;
}

.artwork-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artwork-lightbox[hidden] {
    display: none !important;
}

.artwork-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: zoom-out;
}

.artwork-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.artwork-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.artwork-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 48px;
    height: 72px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.artwork-lightbox__nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.artwork-lightbox__nav:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.artwork-lightbox__nav--prev {
    left: 16px;
    border-radius: 0 8px 8px 0;
}

.artwork-lightbox__nav--next {
    right: 16px;
    border-radius: 8px 0 0 8px;
}

.artwork-lightbox__stage {
    position: relative;
    z-index: 1;
    width: calc(100vw - 160px);
    height: calc(100vh - 120px);
    max-width: calc(100vw - 160px);
    max-height: calc(100vh - 120px);
}

.artwork-lightbox__viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    cursor: zoom-in;
}

.artwork-lightbox__viewport.is-zoomed {
    cursor: grab;
}

.artwork-lightbox__viewport.is-dragging {
    cursor: grabbing;
}

.artwork-lightbox__canvas {
    transform-origin: center center;
    will-change: transform;
}

.artwork-lightbox__img {
    display: block;
    max-width: calc(100vw - 160px);
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.artwork-lightbox--frozen .artwork-lightbox__img {
    filter: grayscale(1);
    opacity: 0.72;
}

.artwork-lightbox__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
}

.artwork-lightbox__panel[hidden] {
    display: none !important;
}

.artwork-lightbox__panel-main {
    flex: 1;
    min-width: 0;
}

.artwork-lightbox__info-line {
    margin: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0;
    min-width: 0;
    overflow: hidden;
}

.artwork-lightbox__info-title {
    flex-shrink: 0;
    max-width: 36%;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artwork-lightbox__info-artist {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.94);
    white-space: nowrap;
}

.artwork-lightbox__info-meta {
    flex-shrink: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.68);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artwork-lightbox__info-sep {
    flex-shrink: 0;
    margin: 0 10px;
    font-size: 13px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.32);
    user-select: none;
}

.artwork-lightbox__panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.artwork-lightbox__panel-actions[hidden] {
    display: none !important;
}

.artwork-lightbox__status.work-status--active {
    color: #95de64;
}

.artwork-lightbox__status.work-status--frozen {
    color: rgba(255, 255, 255, 0.55);
}

.artwork-lightbox__panel-actions .table-action {
    color: #91caff;
    font-size: 14px;
    white-space: nowrap;
}

.artwork-lightbox__counter {
    flex-shrink: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

.artwork-lightbox__counter[hidden] {
    display: none !important;
}

.artwork-lightbox__nav[hidden] {
    display: none !important;
}

/* H5 详情弹窗内触发全屏 */
#artwork-image-wrap {
    cursor: zoom-in;
}

#artwork-zoom-btn {
    pointer-events: auto;
}

@media (max-width: 768px) {
    .artwork-lightbox__panel {
        flex-wrap: wrap;
        padding: 12px 16px 16px;
    }

    .artwork-lightbox__nav {
        width: 36px;
        height: 56px;
        font-size: 28px;
    }

    .artwork-lightbox__stage,
    .artwork-lightbox__viewport {
        width: calc(100vw - 88px);
        height: calc(100vh - 140px);
        max-width: calc(100vw - 88px);
        max-height: calc(100vh - 140px);
    }

    .artwork-lightbox__img {
        max-width: calc(100vw - 88px);
        max-height: calc(100vh - 140px);
    }

    .artwork-lightbox__info-line {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .artwork-lightbox__info-title {
        max-width: 100%;
    }
}
