.wisePanelStageManager {
    --wise-panel-stage-card-width: 52px;
    --wise-panel-stage-card-expanded-width: 116px;
    --wise-panel-stage-card-height: 58px;

    position: absolute;
    right: 10px;
    bottom: 112px;
    z-index: var(--wise-front-z-index-plus4);

    width: var(--wise-panel-stage-card-width);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(26px) scale(0.94);
    transform-origin: right bottom;

    transition:
        opacity 0.18s ease,
        transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s linear 0.26s;
}

.wisePanelStageManager.is-visible:not(.is-empty) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0) scale(1);
    transition-delay: 0s;
}

.wisePanelStageManagerList {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.wisePanelStageManagerCard {
    position: relative;
    width: var(--wise-panel-stage-card-width);
    height: var(--wise-panel-stage-card-height);
    margin: 0;
    padding: 4px;
    overflow: hidden;

    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 6px;

    border: 1px solid color-mix(in srgb, var(--main-color-1) 55%, #555);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 252, 0.9));
    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    color: #222;
    cursor: pointer;
    touch-action: none;

    transition:
        width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.18s ease;
}

.wisePanelStageManagerCard:hover,
.wisePanelStageManagerCard:focus-visible {
    z-index: 5;
    width: var(--wise-panel-stage-card-expanded-width);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.25),
        0 0 0 2px color-mix(in srgb, var(--main-color-1) 55%, transparent);
    outline: none;
}

.wisePanelStageManagerPreview {
    grid-column: 1;
    width: 42px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.08) 0,
            rgba(0, 0, 0, 0.08) 1px,
            transparent 1px,
            transparent 9px
        ),
        color-mix(in srgb, var(--main-color-1) 18%, white);
}

.wisePanelStageManagerPreview img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    pointer-events: none;
}

.wisePanelStageManagerTitle {
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    opacity: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(8px);
    transition:
        opacity 0.14s ease,
        transform 0.2s ease;
}

.wisePanelStageManagerCard:hover .wisePanelStageManagerTitle,
.wisePanelStageManagerCard:focus-visible .wisePanelStageManagerTitle {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 720px) {
    .wisePanelStageManager {
        --wise-panel-stage-card-expanded-width: 104px;
        right: 8px;
    }

    .wisePanelStageManagerCard {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 5px;
    }

    .wisePanelStageManagerPreview {
        width: 42px;
        height: 48px;
    }

    .wisePanelStageManagerTitle {
        font-size: 10px;
    }
}
