﻿/* Fonte oficial do pacote new-interface_pokeidle. */
@scope (#stage .mainbar) {
:scope, :scope * { box-sizing: border-box; }
:scope {
    position: relative;

    width: 999px;
    height: 61px;

    padding: 0;
    margin: 0;

    background:
        url("assets/new-interface/hub/background.png")
        no-repeat left top;

    background-size: auto;

    user-select: none;
}

.mainbar-buttons {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    padding: 0 12px;
}

.mainbar-button {
    position: relative;

    width: 40px;
    height: 42px;
    flex: 0 0 40px;

    display: grid;
    place-items: center;

    padding: 0;
    margin: 0;

    border: 0;
    outline: 0;
    border-radius: 4px;

    background: transparent;

    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;

    transition:
        transform 110ms ease,
        filter 120ms ease,
        background 120ms ease,
        box-shadow 120ms ease;
}

.mainbar-button::before {
    content: "";

    position: absolute;
    inset: 3px 2px;

    border: 1px solid transparent;
    border-radius: 3px;

    background:
        linear-gradient(
            180deg,
            rgba(115, 82, 27, 0) 0%,
            rgba(67, 45, 14, 0) 100%
        );

    box-shadow: none;
    opacity: 0;

    transition:
        opacity 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease,
        background 120ms ease;

    pointer-events: none;
}

.mainbar-button img {
    position: relative;
    z-index: 1;

    display: block;

    max-width: 34px;
    max-height: 34px;

    width: auto;
    height: auto;

    object-fit: contain;
    image-rendering: auto;

    user-select: none;
    pointer-events: none;

    transition:
        transform 110ms ease,
        filter 120ms ease;
}

.mainbar-button:hover,
.mainbar-button:focus-visible {
    transform: translateY(-1px);
}

.mainbar-button:hover::before,
.mainbar-button:focus-visible::before {
    opacity: 1;

    border-color: rgba(202, 157, 65, 0.72);

    background:
        linear-gradient(
            180deg,
            rgba(108, 78, 28, 0.62) 0%,
            rgba(48, 32, 11, 0.72) 100%
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 239, 183, 0.12),
        0 0 7px rgba(216, 166, 66, 0.24);
}

.mainbar-button:hover img,
.mainbar-button:focus-visible img {
    filter:
        brightness(1.12)
        drop-shadow(0 0 3px rgba(255, 204, 93, 0.2));
}

.mainbar-button:focus-visible {
    outline: 1px solid rgba(242, 209, 134, 0.75);
    outline-offset: 1px;
}

.mainbar-button:active {
    transform: translateY(1px);
}

.mainbar-button:active::before {
    opacity: 1;

    border-color: rgba(163, 123, 48, 0.7);

    background:
        linear-gradient(
            180deg,
            rgba(42, 28, 10, 0.78) 0%,
            rgba(73, 49, 15, 0.7) 100%
        );

    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.48);
}

.mainbar-button:active img {
    filter: brightness(0.96);
}

.mainbar-tooltip {
    position: fixed;
    z-index: 5000;

    display: none;

    padding: 6px 8px;

    border: 1px solid #b08d45;
    border-radius: 3px;

    background: rgba(13, 18, 25, 0.97);
    color: #f2e6c3;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    font-size: 11px;
    font-weight: 600;
    line-height: 13px;

    white-space: nowrap;
    pointer-events: none;
}

.mainbar-tooltip.is-visible {
    display: block;
}

@media (max-width: 1020px) {
    .demo-stage {
        justify-items: start;
        overflow-x: auto;
    }

    :scope {
        margin-inline: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mainbar-button,
    .mainbar-button::before,
    .mainbar-button img {
        transition: none;
    }
}

}

