.model-preview-thumb-btn {
    cursor: zoom-in;
    border-radius: var(--tv-radius, 0.375rem);
    line-height: 0;
}

.model-preview-thumb-btn:focus-visible {
    outline: 2px solid var(--tv-accent, #3d6092);
    outline-offset: 2px;
}

.model-preview-thumb-btn img {
    display: block;
    pointer-events: none;
    object-fit: contain;
    background: var(--tv-bg-well, #eaf1fa);
}

.model-preview-thumb-wrap {
    line-height: 0;
}

.model-preview-3d-btn {
    position: absolute;
    right: 3px;
    bottom: 3px;
    z-index: 5;
    pointer-events: auto;
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.3rem;
    background: rgba(255, 255, 255, 0.94);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.model-preview-3d-btn:hover,
.model-preview-3d-btn:focus-visible {
    background: #fff;
    color: #0d6efd;
    outline: none;
}

.model-preview-modal-stage {
    position: relative;
    min-height: 220px;
}

.model-preview-modal-img {
    max-height: min(70vh, 640px);
    width: auto;
    object-fit: contain;
}

.model-preview-modal-viewer {
    width: 100%;
    min-height: 320px;
    height: min(55vh, 520px);
    overflow: hidden;
    touch-action: none;
}

.model-preview-modal-viewer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.model-preview-modal-status {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.4rem;
    padding: 0.45rem 0.75rem;
    pointer-events: none;
}

.model-preview-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    align-items: center;
}

.model-preview-mode-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    border-radius: 0.45rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    color: #495057;
    cursor: pointer;
}

.model-preview-mode-chip img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8f9fa;
}

.model-preview-mode-chip .bi {
    font-size: 1.1rem;
}

.model-preview-mode-chip.is-active {
    border-color: #0d6efd;
    color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.25);
}

.model-preview-mode-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
