/* Shared styles for VehicleEditor, ActorEditor, PlantEditor */

.preview-container {
    position: relative;
}

.preview-container canvas {
    display: block;
    border-radius: 8px;
    cursor: grab;
    max-width: 100%;
    aspect-ratio: 1;
}

.preview-container canvas:active {
    cursor: grabbing;
}

.preview-container canvas:focus {
    outline: none;
}

.preview-container canvas.hidden {
    visibility: hidden;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-input);
    border-radius: 8px;
}

.preview-overlay.error {
    color: var(--color-error, #e74c3c);
    font-size: 0.75em;
    padding: 12px;
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background:
        radial-gradient(transparent 55%, transparent 56%),
        conic-gradient(var(--color-primary, #FFD700) 0deg 90deg, var(--color-border-dark, #333) 90deg 360deg);
    animation: spin 1s linear infinite;
}

.part-nav-wrapper {
    position: relative;
    margin-top: 10px;
}

.part-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.part-info {
    text-align: center;
    min-width: 150px;
}

.nav-index {
    display: block;
    font-size: 0.7em;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-name {
    display: block;
    font-size: 0.9em;
    color: var(--color-text-light);
}

.reset-container {
    height: 1.6em;
}

.side-btn {
    position: absolute;
    right: -36px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (hover: hover) {
    .side-btn:hover:not(.disabled) {
        border-color: var(--color-primary);
        color: var(--color-primary);
    }
}

.side-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.side-btn.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
