﻿/* Fonte oficial do pacote new-interface_pokeidle. */
@scope (#stage .team-bar) {
:scope, :scope * { box-sizing: border-box; }
:scope {
    --team-slots: 6;
    --team-header-height: 63px;
    --team-slot-height: 60px;
    --team-slot-gap: 4px;
    --team-bottom-space: 11px;
    --team-gaps: 5;
    --team-height:
        calc(
            var(--team-header-height)
            + (var(--team-slots) * var(--team-slot-height))
            + (var(--team-gaps) * var(--team-slot-gap))
            + var(--team-bottom-space)
        );

    position: relative;

    width: 281px;
    height: var(--team-height);

    overflow: hidden;

    padding: 0;

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

    background-size: 281px 454px;

    border: 0;
    border-radius: 0;
    box-shadow: none;

    transition: height 140ms ease;
}

:scope::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;

    height: var(--team-bottom-space);

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

    background-size: 281px 454px;

    pointer-events: none;
}

/* CABEÃ‡ALHO */

.team-header {
    position: absolute;
    inset: 0;

    width: 281px;
    height: 63px;

    padding: 0;
}

.player-name {
    position: absolute;
    left: 14px;
    top: 14px;

    margin: 0;

    color: #f4e9c9;

    font-family: "Cinzel", serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;

    text-shadow:
        0 1px 1px rgba(0, 0, 0, 0.7);
}

.player-summary {
    position: absolute;
    left: 14px;
    top: 34px;

    margin: 0;

    color: #b7c5d4;

    font-family: "Barlow", sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 13px;
}

.player-summary span {
    margin: 0 4px;
}

.team-divider {
    position: absolute;
    left: 14px;
    top: 54px;

    width: 253px;
    height: 1px;

    background: rgba(176, 141, 69, 0.42);
}

/* LISTA */

.team-list {
    position: absolute;
    left: 13px;
    top: 63px;

    width: 255px;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 4px;

    margin: 0;
    padding: 0;
}

/* SLOT */

.team-slot {
    position: relative;

    width: 255px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;

    flex: 0 0 60px;

    margin: 0;
    padding: 0;

    border: 0;
    outline: 0;

    background:
        url("assets/new-interface/teambar/slot_restantes/background_nouse.png")
        no-repeat -4px -2px;

    background-size: 263px 68px;

    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;

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

.team-slot.is-active {
    background-image:
        url("assets/new-interface/teambar/slot_selecionado/background_use.png");

    background-position: -4px -2px;
    background-size: 263px 68px;
}

.team-slot:hover {
    filter: brightness(1.05);
}

.team-slot:focus-visible {
    outline: 1px solid rgba(229, 183, 58, 0.85);
    outline-offset: 1px;
}

.team-slot:active {
    transform: translateY(1px);
}

.team-slot.is-fainted {
    opacity: 0.52;
    filter: grayscale(0.5);
}

.team-slot.is-fainted:hover {
    filter: grayscale(0.5);
}

/* CÃRCULO DO SPRITE */

.sprite-frame {
    position: absolute;
    left: 6px;
    top: 6px;

    width: 48px;
    height: 48px;

    background:
        url("assets/new-interface/teambar/slot_restantes/circle_sprite_nouse.png")
        no-repeat center;

    background-size: 48px 48px;
}

.team-slot.is-active .sprite-frame {
    background-image:
        url("assets/new-interface/teambar/slot_selecionado/circle_sprite.png");
}

/* TOPO DO SLOT */

.slot-top {
    position: absolute;
    left: 61px;
    right: 8px;
    top: 4px;

    height: 25px;

    display: flex;
    align-items: center;

    gap: 0;
}

.pokemon-name {
    flex: 0 0 auto;

    margin-right: 5px;

    color: #f2e6c3;

    font-family: "Barlow", sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;

    white-space: nowrap;
}

.rarity-badge {
    position: relative;
    top: 0;
    left: -2px;

    width: auto;
    height: 19px;
    max-width: 68px;

    display: block;
    flex: 0 1 auto;

    margin: 0;
    padding: 0;

    object-fit: contain;
    object-position: left center;

    image-rendering: auto;

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

.rarity-badge.is-missing {
    visibility: hidden;
}

.pokemon-level {
    margin-left: auto;

    color: #e5b73a;

    font-family: "Cinzel", serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 12px;

    text-shadow:
        0 1px 1px rgba(0, 0, 0, 0.25);
}

/* BARRAS */

.status-bars {
    position: absolute;
    left: 61px;
    top: 26px;

    width: 187px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 1px;
}

.status-bar {
    position: relative;

    width: 187px;

    overflow: hidden;

    margin: 0;
}

.status-bar.hp {
    height: 10px;

    background:
        url("assets/new-interface/teambar/bars/hp_bar_empty.png")
        no-repeat center;

    background-size: 187px 10px;
}

.status-bar.exp {
    height: 9px;

    background:
        url("assets/new-interface/teambar/bars/exp_bar_empty.png")
        no-repeat center;

    background-size: 187px 9px;
}

.status-fill {
    position: absolute;
    left: 0;
    top: 0;

    overflow: hidden;
}

.status-fill.hp-fill,
.status-fill.hp-fill img {
    height: 10px;
}

.status-fill.exp-fill,
.status-fill.exp-fill img {
    height: 9px;
}

.status-fill img {
    width: 187px;
    max-width: none;

    display: block;

    margin: 0;

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

.status-label {
    position: absolute;
    inset: 0;
    z-index: 2;

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

    color: #ffffff;

    font-family: "Barlow", sans-serif;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;

    text-shadow:
        -1px 0 #000,
        0 1px #000,
        1px 0 #000,
        0 -1px #000,
        0 1px 1px rgba(0, 0, 0, 0.7);

    pointer-events: none;
}

/* MINIMIZAR */

.team-minimize {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;

    width: 18px;
    height: 18px;

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

    padding: 0;

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

    background: rgba(13, 18, 25, 0.34);
    color: #f2d186;

    font-family: "Barlow", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    opacity: 0.88;

    cursor: pointer;

    transition:
        border-color 120ms ease,
        background 120ms ease,
        opacity 120ms ease,
        filter 120ms ease;
}

.team-minimize:hover,
.team-minimize:focus-visible {
    border-color: #b08d45;
    background: rgba(176, 141, 69, 0.08);

    opacity: 1;

    outline: none;
    filter: brightness(1.08);
}

/* ESTADO MINIMIZADO */

:scope.is-minimized {
    width: 281px;
    height: 54px;

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

    background-size: auto;

    border: 0;
    box-shadow: none;
}

:scope.is-minimized::after {
    display: none;
}

:scope.is-minimized .team-header {
    width: 281px;
    height: 54px;
}

:scope.is-minimized .team-list,
:scope.is-minimized .team-divider {
    display: none;
}

:scope.is-minimized .player-name {
    left: 12px;
    top: 12px;
}

:scope.is-minimized .player-summary {
    display: block;

    left: 12px;
    top: 27px;
}

:scope.is-minimized .team-minimize {
    top: 12px;
    right: 12px;
}


/* TESTE DE BADGES */

.demo-stage {
    flex-direction: column;
    gap: 12px;
}

.badge-tester {
    width: 281px;

    display: grid;
    grid-template-columns: 1fr 118px;
    align-items: center;
    gap: 8px;

    padding: 8px 10px;

    border: 1px solid #5a4730;
    border-radius: 2px;

    background: #0d1219;
}

.badge-tester label {
    color: #9fb3bb;

    font-family: "Barlow", sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.55px;
}

.badge-tester select {
    height: 26px;

    border: 1px solid #405563;
    border-radius: 2px;

    background: #111a22;
    color: #f2e6c3;

    font-family: "Barlow", sans-serif;
    font-size: 9px;
    font-weight: 600;
}


/* ARRASTAR A BARRA */

.team-header {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

:scope.is-dragging .team-header {
    cursor: grabbing;
}

.team-minimize {
    cursor: pointer;
}


/* EFEITO VISUAL DA BARRA DE HP */

.status-fill.hp-fill {
    position: absolute;
    isolation: isolate;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 0 4px rgba(105, 220, 108, 0.2);
}

.status-fill.hp-fill::before {
    content: "";

    position: absolute;
    inset: 1px 0 auto 0;
    z-index: 1;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.34),
            rgba(255, 255, 255, 0.08)
        );

    opacity: 0.7;
    pointer-events: none;
}

.status-fill.hp-fill::after {
    content: "";

    position: absolute;
    top: 0;
    bottom: 0;
    left: -34%;
    z-index: 2;

    width: 28%;

    background:
        linear-gradient(
            105deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 32%,
            rgba(255, 255, 255, 0.52) 50%,
            rgba(255, 255, 255, 0.08) 68%,
            transparent 100%
        );

    transform: skewX(-18deg);
    animation: hp-shine 3.2s ease-in-out infinite;

    pointer-events: none;
}

@keyframes hp-shine {
    0%,
    58% {
        left: -34%;
        opacity: 0;
    }

    66% {
        opacity: 0.85;
    }

    84% {
        left: 112%;
        opacity: 0.4;
    }

    100% {
        left: 112%;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .status-fill.hp-fill::after {
        animation: none;
        display: none;
    }
}

}

