.identity-attachment-thumb,
.license-attachment-thumb {
    position: relative;
    display: inline-block;
    cursor: zoom-in;
}

.identity-attachment-thumb .identity-zoom-overlay,
.license-attachment-thumb .license-zoom-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #fff;
    font-size: 1.5rem;
}

.identity-attachment-thumb:hover .identity-zoom-overlay,
.license-attachment-thumb:hover .license-zoom-overlay {
    opacity: 1;
}

.identity-attachment-thumb img,
.license-attachment-thumb img {
    border-radius: 4px;
}

.attachment-zoom-shell {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.attachment-zoom-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    align-self: center;
    flex-wrap: wrap;
}

.attachment-zoom-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    background: #f8f9fa;
    touch-action: none;
}

.attachment-zoom-stage img.attachment-zoom-image {
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.12s ease;
    will-change: transform;
    cursor: zoom-in;
}

.attachment-zoom-shell[data-zoomed="true"] .attachment-zoom-image {
    cursor: grab;
}

.attachment-zoom-shell[data-dragging="true"] .attachment-zoom-image {
    cursor: grabbing;
    transition: none;
}

@media (max-width: 575.98px) {
    .attachment-zoom-stage {
        padding: 0.35rem;
    }

    .attachment-zoom-stage img.attachment-zoom-image {
        max-height: 68vh;
    }
}
