.car-with-wheels {
    position: relative;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    flex-shrink: 0;
    line-height: 0;
    vertical-align: middle;
    --car-sprite-height: 72px;
}

.car-with-wheels__body {
    display: block;
    height: var(--car-sprite-height);
    width: auto;
}

.car-display-fallback {
    display: block;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    flex-shrink: 0;
    height: var(--car-sprite-height, 72px);
}

.car-with-wheels__wheel {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    height: auto;
}

.car-with-wheels--mirrored .car-with-wheels__body,
.car-with-wheels--mirrored .car-with-wheels__wheel {
    transform: scaleX(-1);
}

.car-with-wheels--mirrored .car-with-wheels__wheel {
    transform: translate(-50%, -50%) scaleX(-1);
}

.wheel-calibrator {
    max-width: 640px;
}

.wheel-calibrator__stage {
    position: relative;
    display: inline-block;
    border: 2px solid #636363;
    background: #2a2a2a;
    touch-action: none;
    user-select: none;
}

.wheel-calibrator__body {
    display: block;
    max-width: 100%;
    height: auto;
}

.wheel-calibrator__wheel {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: grab;
    touch-action: none;
}

.wheel-calibrator__legend {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 0;
    font-size: 12px;
    color: #999;
    max-width: 100%;
}

.wheel-calibrator__legend span {
    flex: 1;
}

.wheel-calibrator__legend span:first-child {
    text-align: left;
}

.wheel-calibrator__legend span:last-child {
    text-align: right;
}

.wheel-calibrator__wheel.is-dragging {
    cursor: grabbing;
    z-index: 2;
}

.wheel-calibrator__controls {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.wheel-calibrator__values {
    font-family: monospace;
    font-size: 12px;
    color: #ccc;
    line-height: 1.5;
}

.wheel-calibrator__scale-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wheel-calibrator__scale-row input[type="range"] {
    flex: 1;
}

.wheel-calibrator__apply-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

.wheel-shop-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.wheel-shop-list > li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #636363;
}

.wheel-shop-list > li:last-child {
    border-bottom: none;
}

.wheel-shop-list__preview {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #2a2a2a;
    border: 1px solid #636363;
}

.wheel-shop-list__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wheel-shop-list__name {
    color: #fcd330;
    font-weight: bold;
}

.wheel-shop-list__price {
    font-size: 13px;
    color: #ccc;
}

.wheel-shop-list__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.wheel-shop-preview {
    margin: 12px 0;
    padding: 10px;
    background: #3e3e3e;
    border-top: 1px solid #636363;
    border-bottom: 1px solid #636363;
    text-align: center;
}

.wheel-shop-preview .car-with-wheels {
    display: inline-block;
}

.wheel-shop-preview__caption {
    margin-top: 6px;
    color: #ccc;
    font-size: 13px;
}

.wheel-shop-preview__hint {
    margin-top: 8px;
    color: #999;
    font-size: 12px;
}

.wheel-shop-buy-panel {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #636363;
}

.wheel-shop-buy-panel__title {
    color: #fcd330;
    font-weight: bold;
    margin-bottom: 8px;
}

.wheel-shop-buy-panel__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.wheel-shop-buy-panel__cancel {
    background-color: #666 !important;
    color: #fff !important;
    padding: 2px 10px !important;
}

.wheel-shop-list > li.is-previewing {
    background: rgba(252, 211, 48, 0.08);
    border-radius: 4px;
    padding-left: 4px;
    padding-right: 4px;
}
