/**********************************************************************
 * Machine and Image Management Styles
 **********************************************************************/

.machine-img {
    width: 100%;
    height: 222px;
    object-fit: cover;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.machine-grid-rows {
    display: grid;
    gap: 16px;
}

.machine-row {
    --machine-row-gap: 16px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--machine-row-gap) * 4)) / 5);
    gap: var(--machine-row-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: none;
    padding-bottom: 6px;
    cursor: grab;
    overscroll-behavior-x: contain;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    align-items: stretch;
}

.machine-row {
    scrollbar-width: none;
}

.machine-row::-webkit-scrollbar {
    height: 0px;
    background: transparent;
}

.machine-row::-webkit-scrollbar-thumb {
    background: transparent;
    border: none;
}

.machine-row.is-dragging {
    cursor: grabbing;
}

.machine-row.is-dragging * {
    user-select: none;
}

.machine-card {
    scroll-snap-align: start;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 560px;
}

.machine-row-wrap {
    position: relative;
}

.machine-row-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.18);
    color: rgba(231, 238, 248, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.15s ease;
}

.machine-row-arrow:hover {
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
}

.machine-row-arrow.left {
    left: -28px;
}

.machine-row-arrow.right {
    right: -28px;
}

.machine-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1 1 auto;
}

.machine-actions {
    margin-top: auto;
    padding-top: 8px;
    padding-bottom: 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.machine-actions .mini-btn {
    height: 38px;
    width: 100%;
}
