/* =========================================================
   MUSICALWORLD — MENU PRINCIPAL

   Arquivo:
   css/menu-inferior.css

   Responsabilidade:

   - Estilizar o menu principal de navegação.
   - Controlar o comportamento mobile.
   - Controlar o comportamento tablet / iPad.
   - Controlar o comportamento desktop.
   - Mobile / Tablet / iPad:
     menu horizontal fixado na parte inferior.
   - Desktop:
     menu vertical fixado no topo/lateral.
   - Desktop:
     exibir ícone + texto.
   - Mobile / Tablet / iPad:
     exibir somente os ícones.
   - Manter o menu limpo e integrado ao aplicativo.
   - Estilizar o indicador do item ativo.
   - Estilizar os ícones.
   - Estilizar a foto do usuário.
   - Estilizar o contador de Contratações.

   RESPONSIVIDADE:

   Até 1199px:
   - Menu horizontal inferior.
   - Centralizado.
   - Fundo translúcido.
   - Apenas os ícones são exibidos.
   - Mesmo comportamento visual do celular.
   - Nenhum ícone possui círculo azul de destaque.

   A partir de 1200px:
   - Menu vertical lateral.
   - Posicionado abaixo do cabeçalho.
   - Ícone e texto são exibidos.

   IMPORTANTE:

   O menu utiliza position: fixed.
   Portanto, ele não participa do fluxo normal
   do conteúdo principal.
========================================================= */


/* =========================================================
   MENU PRINCIPAL — MOBILE / TABLET / IPAD
========================================================= */

.bottom-nav {

    position: fixed;

    left: 50%;

    bottom: 12px;

    transform:
        translateX(-50%);

    width:
        calc(100% - 40px);

    max-width: 480px;

    height: 64px;

    display: flex;

    align-items: center;

    justify-content: space-around;

    padding:
        0
        6px
        env(safe-area-inset-bottom)
        6px;

    background:
        rgba(255, 255, 255, 0.72);

    border:
        1px solid
        rgba(226, 232, 240, 0.95);

    border-radius: 100px;

    box-shadow:
        0 12px 30px
        rgba(15, 23, 42, 0.10);

    backdrop-filter:
        blur(20px);

    -webkit-backdrop-filter:
        blur(20px);

    z-index: 9999;

    overflow: visible;

    transition:
        transform 0.24s cubic-bezier(
            0.22,
            1,
            0.36,
            1
        );

}


/* =========================================================
   EFEITO DE ROLAGEM — MOBILE / TABLET / IPAD
========================================================= */

.bottom-nav.menu-reduzido {

    transform:
        translateX(-50%)
        scale(0.80);

}


/* =========================================================
   INDICADOR DO ITEM ATIVO

   O indicador não será mais azul.

   Ele funciona apenas como uma área de destaque
   muito suave atrás do ícone selecionado.
========================================================= */

.nav-active-indicator {

    position: absolute;

    top: 50%;

    left: 0;

    width: 46px;

    height: 46px;

    border-radius: 14px;

    background:
        #f1f3f5;

    border:
        1px solid
        rgba(15, 23, 42, 0.035);

    pointer-events: none;

    transform:
        translate3d(
            0,
            -50%,
            0
        );

    transition:
        transform 0.28s cubic-bezier(
            0.22,
            1,
            0.36,
            1
        );

    z-index: 0;

}


/* =========================================================
   ITEM DO MENU
========================================================= */

.bottom-nav-item {

    position: relative;

    width: 20%;

    height: 100%;

    min-width: 0;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 3px;

    padding: 0;

    margin: 0;

    color: #172033;

    background: transparent;

    border: 0;

    border-radius: 16px;

    font-family: inherit;

    cursor: pointer;

    appearance: none;

    -webkit-appearance: none;

    -webkit-tap-highlight-color: transparent;

    z-index: 1;

    transition:
        color 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease;

}


/* =========================================================
   TEXTO DO ITEM
========================================================= */

.nav-item-label {

    display: none;

}


/* =========================================================
   ITEM ATIVO

   O ícone ativo permanece preto.
   Não utilizamos mais azul no item selecionado.
========================================================= */

.bottom-nav-item.ativo {

    color: #172033;

}


/* =========================================================
   ÍCONE ATIVO — GARANTIR PRETO
========================================================= */

.bottom-nav-item.ativo .nav-icon-svg {

    color: #172033;

    stroke: #172033;

}


/* =========================================================
   HOME — CONTROLE DO PREENCHIMENTO

   Estado normal:
   - somente contorno;
   - sem preenchimento;
   - porta também sem fundo.

   Estado ativo:
   - casa preenchida;
   - mantém o visual sólido somente quando
     o Home estiver selecionado.
========================================================= */

.bottom-nav-item[data-aba="home"] .nav-icon-home {

    fill: none;

    stroke: none;

}


.bottom-nav-item[data-aba="home"]
.nav-icon-home .home-icon-outline {

    display: block;

    fill: none;

    stroke: currentColor;

}


.bottom-nav-item[data-aba="home"]
.nav-icon-home .home-icon-solid,

.bottom-nav-item[data-aba="home"]
.nav-icon-home .home-icon-door {

    display: none;

}


/* =========================================================
   HOME — ATIVO
========================================================= */

.bottom-nav-item[data-aba="home"].ativo
.nav-icon-home .home-icon-outline {

    display: none;

}


.bottom-nav-item[data-aba="home"].ativo
.nav-icon-home .home-icon-solid {

    display: block;

    fill: currentColor;

}


.bottom-nav-item[data-aba="home"].ativo
.nav-icon-home .home-icon-door {

    display: block;

    fill: none;

    stroke: #f1f3f5;

}


/* =========================================================
   ÍCONE
========================================================= */

.nav-icon-wrapper {

    position: relative;

    width: 30px;

    height: 30px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

}


.nav-icon-svg {

    width: 26px;

    height: 26px;

    display: block;

    color: currentColor;

    stroke: currentColor;

    fill: none;

    pointer-events: none;

}


/* =========================================================
   CONTADOR — CONTRATAÇÕES

   Exibe a quantidade de notificações não lidas
   relacionadas a propostas / contratações.

   O contador fica acima do ícone de Contratações.
   Ele não interfere no indicador do item ativo.
========================================================= */

.nav-contratacoes-badge {

    position: absolute;

    top: -8px;

    right: -8px;

    min-width: 17px;

    height: 17px;

    padding:
        0
        4px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 999px;

    background:
        #ef4444;

    color:
        #ffffff;

    font-family: inherit;

    font-size: 10px;

    font-weight: 800;

    line-height: 1;

    white-space: nowrap;

    border:
        2px solid
        #ffffff;

    box-shadow:
        0 2px 6px
        rgba(15, 23, 42, 0.16);

    pointer-events: none;

    z-index: 3;

}


/* =========================================================
   CONTADOR — OCULTO
========================================================= */

.nav-contratacoes-badge[hidden] {

    display: none;

}


/* =========================================================
   FOTO DO PERFIL
========================================================= */

.profile-icon-wrapper {

    overflow: visible;

}


.nav-profile-image {

    width: 30px;

    height: 30px;

    display: block;

    object-fit: cover;

    border-radius: 50%;

    border:
        2px solid
        rgba(255, 255, 255, 0.95);

    box-shadow:
        0 2px 8px
        rgba(15, 23, 42, 0.12);

    background:
        #e2e8f0;

}


.profile-icon-wrapper.has-profile-image
.profile-default-icon {

    display: none;

}


.profile-icon-wrapper.has-profile-image
.profile-dot {

    display: none;

}


/* =========================================================
   INDICADOR DO PERFIL
========================================================= */

.profile-dot {

    position: absolute;

    right: -1px;

    bottom: -1px;

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background:
        #1677d2;

    border:
        2px solid
        #ffffff;

}


/* =========================================================
   INTERAÇÃO
========================================================= */

.bottom-nav-item:hover {

    color: #172033;

}


.bottom-nav-item:active {

    transform:
        scale(0.94);

}


.bottom-nav-item:focus-visible {

    outline:
        2px solid
        rgba(23, 32, 51, 0.20);

    outline-offset: 2px;

}


/* =========================================================
   FINANCEIRO — MENU INFERIOR
========================================================= */

.bottom-nav-item[data-aba="financeiro"] {

    color:
        #172033;

}


.bottom-nav-item[data-aba="financeiro"].ativo {

    color:
        #172033;

}


.bottom-nav-item[data-aba="financeiro"]
.nav-icon-wrapper {

    width: 30px;

    height: 30px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 0;

    background:
        transparent;

    color:
        currentColor;

    box-shadow:
        none;

    transform:
        none;

}


.bottom-nav-item[data-aba="financeiro"]
.nav-icon-svg {

    width: 26px;

    height: 26px;

    color:
        currentColor;

    stroke:
        currentColor;

}


/* =========================================================
   TABLET / IPAD
   601px → 1199px
========================================================= */

@media (min-width: 601px) and (max-width: 1199px) {

    .bottom-nav {

        width:
            min(
                calc(100% - 48px),
                520px
            );

        max-width:
            520px;

        bottom: 18px;

        height: 68px;

        border-radius: 24px;

    }


    .nav-active-indicator {

        width: 50px;

        height: 50px;

        border-radius: 15px;

        background:
            #f1f3f5;

    }


    .bottom-nav-item {

        border-radius: 17px;

    }


    .nav-icon-wrapper {

        width: 32px;

        height: 32px;

    }


    .nav-icon-svg {

        width: 27px;

        height: 27px;

    }


    .nav-profile-image {

        width: 32px;

        height: 32px;

    }


    .bottom-nav-item[data-aba="financeiro"]
    .nav-icon-wrapper {

        width: 32px;

        height: 32px;

        background:
            transparent;

        box-shadow:
            none;

        transform:
            none;

        border-radius: 0;

    }


    .bottom-nav-item[data-aba="financeiro"]
    .nav-icon-svg {

        width: 27px;

        height: 27px;

        color:
            currentColor;

        stroke:
            currentColor;

    }

}


/* =========================================================
   DESKTOP
   A PARTIR DE 1200px
========================================================= */

@media (min-width: 1200px) {

    .bottom-nav {

        position: fixed;

        top: 76px;

        bottom: auto;

        left:
            max(
                20px,
                calc(50% - 610px)
            );

        right: auto;

        transform: none;

        width: 180px;

        max-width: 180px;

        height: auto;

        min-height: 0;

        padding: 0;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        justify-content: flex-start;

        gap: 4px;

        background:
            transparent;

        border: none;

        border-radius: 0;

        box-shadow: none;

        backdrop-filter: none;

        -webkit-backdrop-filter: none;

        z-index: 9999;

        overflow: visible;

    }


    /* =====================================================
       INDICADOR — DESKTOP
    ===================================================== */

    .nav-active-indicator {

        top: 0;

        left: 50%;

        width: 100%;

        height: 48px;

        border-radius: 14px;

        background:
            #f1f3f5;

        border:
            1px solid
            rgba(15, 23, 42, 0.035);

        transform:
            translate3d(
                -50%,
                0,
                0
            );

        transition:
            transform 0.28s cubic-bezier(
                0.22,
                1,
                0.36,
                1
            );

    }


    /* =====================================================
       ITENS — DESKTOP
    ===================================================== */

    .bottom-nav-item {

        width: 100%;

        height: 48px;

        min-height: 48px;

        flex:
            0 0 48px;

        display: flex;

        flex-direction: row;

        align-items: center;

        justify-content: flex-start;

        gap: 11px;

        padding:
            0
            10px;

        margin: 0;

        background:
            transparent;

        border: none;

        border-radius: 14px;

        text-align: left;

    }


    /* =====================================================
       TEXTO — DESKTOP
    ===================================================== */

    .nav-item-label {

        display: block;

        min-width: 0;

        color:
            currentColor;

        font-size: 13px;

        font-weight: 700;

        line-height: 1.2;

        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;

    }


    /* =====================================================
       ÍCONES — DESKTOP
    ===================================================== */

    .nav-icon-wrapper {

        width: 28px;

        height: 28px;

        min-width: 28px;

    }


    .nav-icon-svg {

        width: 24px;

        height: 24px;

    }


    /* =====================================================
       FOTO DO PERFIL — DESKTOP
    ===================================================== */

    .nav-profile-image {

        width: 28px;

        height: 28px;

    }


    .profile-icon-wrapper {

        flex:
            0 0 28px;

    }


    /* =====================================================
       FINANCEIRO — DESKTOP
    ===================================================== */

    .bottom-nav-item[data-aba="financeiro"] {

        color:
            #172033;

    }


    .bottom-nav-item[data-aba="financeiro"]:hover {

        color:
            #172033;

    }


    .bottom-nav-item[data-aba="financeiro"].ativo {

        color:
            #172033;

    }


    .bottom-nav-item[data-aba="financeiro"]
    .nav-icon-wrapper {

        width: 28px;

        height: 28px;

        background:
            transparent;

        color:
            currentColor;

        box-shadow:
            none;

        transform:
            none;

        border-radius: 0;

    }


    .bottom-nav-item[data-aba="financeiro"]
    .nav-icon-svg {

        width: 24px;

        height: 24px;

        color:
            currentColor;

        stroke:
            currentColor;

    }


    /* =====================================================
       HOVER — DESKTOP
    ===================================================== */

    .bottom-nav-item:hover {

        background:
            transparent;

        color:
            #172033;

    }


    /* =====================================================
       ITEM ATIVO — DESKTOP
    ===================================================== */

    .bottom-nav-item.ativo {

        background:
            transparent;

        color:
            #172033;

    }


    .bottom-nav-item:active {

        transform:
            scale(0.98);

    }

}


/* =========================================================
   DESKTOP — TELAS MUITO LARGAS
========================================================= */

@media (min-width: 1200px) {

    .bottom-nav {

        top: 76px;

        left:
            max(
                20px,
                calc(50% - 610px)
            );

        width: 180px;

        max-width: 180px;

    }

}


/* =========================================================
   TELAS MUITO PEQUENAS
   Até 360px
========================================================= */

@media (max-width: 360px) {

    .bottom-nav {

        width:
            calc(100% - 18px);

        bottom: 9px;

        height: 62px;

        border-radius: 20px;

    }


    .nav-active-indicator {

        width: 42px;

        height: 42px;

        border-radius: 13px;

        background:
            #f1f3f5;

    }


    .bottom-nav-item {

        border-radius: 14px;

    }


    .nav-icon-wrapper {

        width: 28px;

        height: 28px;

    }


    .nav-icon-svg {

        width: 24px;

        height: 24px;

    }


    .nav-profile-image {

        width: 28px;

        height: 28px;

    }


    .bottom-nav-item[data-aba="financeiro"]
    .nav-icon-wrapper {

        width: 28px;

        height: 28px;

        background:
            transparent;

        box-shadow:
            none;

        transform:
            none;

        border-radius: 0;

    }


    .bottom-nav-item[data-aba="financeiro"]
    .nav-icon-svg {

        width: 24px;

        height: 24px;

    }

}


/* =========================================================
   ÁREA SEGURA — IPHONE / ANDROID
========================================================= */

@supports (padding-bottom: env(safe-area-inset-bottom)) {

    @media (max-width: 1199px) {

        .bottom-nav {

            padding-bottom:
                env(safe-area-inset-bottom);

        }

    }

}


/* =========================================================
   REDUÇÃO DE MOVIMENTO
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .bottom-nav,
    .bottom-nav-item,
    .nav-active-indicator {

        transition:
            none !important;

    }

}

/* =========================================================
   MUSICALWORLD — TEMA DO MENU INFERIOR

   Responsabilidade:

   - Aplicar o tema escuro diretamente ao menu principal.
   - Garantir que o menu tenha o mesmo comportamento visual
     em todas as páginas do aplicativo.
   - Respeitar:
       light
       dark
       system

   IMPORTANTE:

   - Não altera dimensões.
   - Não altera posicionamento.
   - Não altera responsividade.
   - Não altera animações.
   - Não altera comportamento do menu.
   - Apenas substitui cores, bordas, sombras e superfícies.
========================================================= */


/* =========================================================
   TEMA ESCURO — MENU PRINCIPAL
========================================================= */

html[data-theme="dark"] .bottom-nav {

    background:
        rgba(23, 26, 34, 0.82);

    border-color:
        rgba(42, 48, 60, 0.95);

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, 0.32);

}


/* =========================================================
   INDICADOR ATIVO — DARK
========================================================= */

html[data-theme="dark"] .nav-active-indicator {

    background:
        #252a35;

    border-color:
        rgba(255, 255, 255, 0.045);

}


/* =========================================================
   ITENS DO MENU — DARK
========================================================= */

html[data-theme="dark"] .bottom-nav-item {

    color:
        #b4bcc9;

}


html[data-theme="dark"] .bottom-nav-item.ativo {

    color:
        #f3f5f8;

}


html[data-theme="dark"] .bottom-nav-item.ativo .nav-icon-svg {

    color:
        #f3f5f8;

    stroke:
        #f3f5f8;

}


/* =========================================================
   HOVER — DARK
========================================================= */

html[data-theme="dark"] .bottom-nav-item:hover {

    color:
        #f3f5f8;

}


/* =========================================================
   FOCO — DARK
========================================================= */

html[data-theme="dark"] .bottom-nav-item:focus-visible {

    outline-color:
        rgba(139, 108, 255, 0.42);

}


/* =========================================================
   HOME — DARK
========================================================= */

html[data-theme="dark"]
.bottom-nav-item[data-aba="home"].ativo
.nav-icon-home .home-icon-door {

    stroke:
        #252a35;

}


/* =========================================================
   FOTO DO PERFIL — DARK
========================================================= */

html[data-theme="dark"] .nav-profile-image {

    border-color:
        rgba(23, 26, 34, 0.95);

    box-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.28);

    background:
        #2a303c;

}


/* =========================================================
   INDICADOR DO PERFIL — DARK
========================================================= */

html[data-theme="dark"] .profile-dot {

    border-color:
        #171a22;

}


/* =========================================================
   CONTADOR DE CONTRATAÇÕES — DARK
========================================================= */

html[data-theme="dark"] .nav-contratacoes-badge {

    border-color:
        #171a22;

    box-shadow:
        0 2px 6px
        rgba(0, 0, 0, 0.32);

}


/* =========================================================
   FINANCEIRO — DARK
========================================================= */

html[data-theme="dark"]
.bottom-nav-item[data-aba="financeiro"] {

    color:
        #b4bcc9;

}


html[data-theme="dark"]
.bottom-nav-item[data-aba="financeiro"].ativo {

    color:
        #f3f5f8;

}


html[data-theme="dark"]
.bottom-nav-item[data-aba="financeiro"]:hover {

    color:
        #f3f5f8;

}


/* =========================================================
   FINANCEIRO — ÍCONE DARK
========================================================= */

html[data-theme="dark"]
.bottom-nav-item[data-aba="financeiro"]
.nav-icon-svg {

    color:
        currentColor;

    stroke:
        currentColor;

}


/* =========================================================
   TEMA SYSTEM — DARK

   Quando o usuário selecionou "Sistema" na aparência,
   o menu acompanha o tema escuro do dispositivo.
========================================================= */

@media (prefers-color-scheme: dark) {

    html[data-theme="system"] .bottom-nav {

        background:
            rgba(23, 26, 34, 0.82);

        border-color:
            rgba(42, 48, 60, 0.95);

        box-shadow:
            0 12px 30px
            rgba(0, 0, 0, 0.32);

    }


    html[data-theme="system"] .nav-active-indicator {

        background:
            #252a35;

        border-color:
            rgba(255, 255, 255, 0.045);

    }


    html[data-theme="system"] .bottom-nav-item {

        color:
            #b4bcc9;

    }


    html[data-theme="system"] .bottom-nav-item.ativo {

        color:
            #f3f5f8;

    }


    html[data-theme="system"]
    .bottom-nav-item.ativo
    .nav-icon-svg {

        color:
            #f3f5f8;

        stroke:
            #f3f5f8;

    }


    html[data-theme="system"] .bottom-nav-item:hover {

        color:
            #f3f5f8;

    }


    html[data-theme="system"] .bottom-nav-item:focus-visible {

        outline-color:
            rgba(139, 108, 255, 0.42);

    }


    html[data-theme="system"]
    .bottom-nav-item[data-aba="home"].ativo
    .nav-icon-home .home-icon-door {

        stroke:
            #252a35;

    }


    html[data-theme="system"] .nav-profile-image {

        border-color:
            rgba(23, 26, 34, 0.95);

        box-shadow:
            0 2px 8px
            rgba(0, 0, 0, 0.28);

        background:
            #2a303c;

    }


    html[data-theme="system"] .profile-dot {

        border-color:
            #171a22;

    }


    html[data-theme="system"] .nav-contratacoes-badge {

        border-color:
            #171a22;

        box-shadow:
            0 2px 6px
            rgba(0, 0, 0, 0.32);

    }


    html[data-theme="system"]
    .bottom-nav-item[data-aba="financeiro"] {

        color:
            #b4bcc9;

    }


    html[data-theme="system"]
    .bottom-nav-item[data-aba="financeiro"].ativo {

        color:
            #f3f5f8;

    }


    html[data-theme="system"]
    .bottom-nav-item[data-aba="financeiro"]:hover {

        color:
            #f3f5f8;

    }


    html[data-theme="system"]
    .bottom-nav-item[data-aba="financeiro"]
    .nav-icon-svg {

        color:
            currentColor;

        stroke:
            currentColor;

    }

}