/*
 * AmanjKing Original Weighted Wheel integration.
 * Only the old Wheel view is visually replaced.
 * Dice, Tournament and other Arena views are untouched.
 */

#ag2PvpView.ag-wheel-original-mounted {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 !important;
}

#ag2PvpView.ag-wheel-original-mounted
> :not(.ag-wheel-original-shell) {
    display: none !important;
}

#ag2PvpView .ag-wheel-original-shell {
    position: relative;
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    padding:
        max(12px, env(safe-area-inset-top))
        12px
        max(24px, env(safe-area-inset-bottom));
    background:
        radial-gradient(
            circle at 90% 0%,
            rgba(139, 92, 246, 0.20),
            transparent 34%
        ),
        radial-gradient(
            circle at 0% 30%,
            rgba(49, 170, 255, 0.11),
            transparent 30%
        ),
        #08070e;
}

#ag2PvpView .ag-wheel-original-topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    margin: -12px -12px 10px;
    padding:
        max(10px, env(safe-area-inset-top))
        14px
        10px;
    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
    background: rgba(8, 7, 14, 0.90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

#ag2PvpView .ag-wheel-original-title {
    min-width: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#ag2PvpView .ag-wheel-original-close {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border:
        1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.04)
        );
    color: #ffffff;
    font: inherit;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#ag2PvpView .ag-wheel-original-close:active {
    transform: scale(0.94);
}

#ag2PvpView #ag2WheelView {
    width: 100%;
    min-height: 560px;
}

#ag2PvpView .ag-wheel-mount-error {
    display: grid;
    min-height: 320px;
    place-items: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

#ag2PvpView .ag-wheel-mount-error strong {
    display: block;
    margin-bottom: 7px;
    color: #ff879a;
    font-size: 15px;
}

@media (max-width: 480px) {
    #ag2PvpView .ag-wheel-original-shell {
        padding-left: 8px;
        padding-right: 8px;
    }

    #ag2PvpView .ag-wheel-original-topbar {
        margin-left: -8px;
        margin-right: -8px;
    }

    #ag2PvpView #ag2WheelView {
        min-height: 520px;
    }
}
