/* Sino de notificações da barra superior.
   --notif-acento vem do Root.master com a cor do tema do usuário. */
.notif {
    --notif-acento: #54B689;
    --notif-borda: #e5eaed;
    --notif-texto: #26343d;
    --notif-texto-suave: #6b7680;
    position: relative;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.notif-celula {
    padding-right: 4px;
    vertical-align: middle;
}

.notif-botao {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #4a5963;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

    .notif-botao:hover,
    .notif.aberto .notif-botao {
        background: rgba(0, 0, 0, .06);
        color: var(--notif-texto);
    }

    .notif-botao:focus-visible {
        outline: 2px solid var(--notif-acento);
        outline-offset: 1px;
    }

    .notif-botao svg {
        width: 22px;
        height: 22px;
    }

.notif-contador {
    position: absolute;
    top: 3px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    box-sizing: border-box;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

    .notif-contador[hidden] {
        display: none;
    }

/* Chegou notificação nova: o sino balança */
.notif.nova .notif-botao svg {
    animation: notif-balanco .8s ease;
    transform-origin: 50% 10%;
}

@keyframes notif-balanco {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(14deg); }
    40% { transform: rotate(-12deg); }
    60% { transform: rotate(8deg); }
    80% { transform: rotate(-4deg); }
}

/* Painel */
.notif-painel {
    position: absolute;
    top: calc(100% + 8px);
    right: -6px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    width: 370px;
    max-height: min(520px, calc(100vh - 90px));
    border: 1px solid var(--notif-borda);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(20, 31, 38, .2);
    overflow: hidden;
    color: var(--notif-texto);
    text-align: left;
}

    .notif-painel[hidden] {
        display: none;
    }

.notif-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--notif-borda);
}

.notif-titulo {
    font-size: 15px;
    font-weight: 600;
}

.notif-marcar-todas {
    padding: 4px 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--notif-acento);
    font: 600 12.5px "Segoe UI", Roboto, Arial, sans-serif;
    cursor: pointer;
}

    .notif-marcar-todas:hover {
        background: rgba(0, 0, 0, .05);
    }

    .notif-marcar-todas[hidden] {
        display: none;
    }

.notif-lista {
    overflow-y: auto;
}

.notif-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 12px 34px 12px 16px;
    border-bottom: 1px solid #f1f4f6;
    color: inherit;
    text-decoration: none;
    cursor: default;
}

a.notif-item {
    cursor: pointer;
}

    .notif-item:last-child {
        border-bottom: 0;
    }

    .notif-item:hover {
        background: #f8fafb;
    }

    .notif-item.nao-lida {
        background: color-mix(in srgb, var(--notif-acento) 7%, #fff);
    }

        .notif-item.nao-lida:hover {
            background: color-mix(in srgb, var(--notif-acento) 12%, #fff);
        }

        /* bolinha de não lida */
        .notif-item.nao-lida::after {
            content: "";
            position: absolute;
            top: 50%;
            right: 14px;
            width: 8px;
            height: 8px;
            margin-top: -4px;
            border-radius: 50%;
            background: var(--notif-acento);
        }

.notif-icone {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef1f3;
    color: #5f6b75;
}

    .notif-icone.notif-tipo-boleto {
        background: #e5f6ee;
        color: #1f9d63;
    }

.notif-corpo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.notif-item-titulo {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}

.notif-item-mensagem {
    color: #4a5963;
    font-size: 12.5px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.notif-item-tempo {
    margin-top: 2px;
    color: var(--notif-texto-suave);
    font-size: 11.5px;
}

.notif-vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    color: var(--notif-texto-suave);
    font-size: 13.5px;
    text-align: center;
}

    .notif-vazio svg {
        width: 28px;
        height: 28px;
        opacity: .5;
    }

/* Celular: painel ocupa a largura da tela, logo abaixo da barra */
@media (max-width: 600px) {
    .notif-painel {
        position: fixed;
        top: 60px;
        right: 8px;
        left: 8px;
        width: auto;
        max-height: calc(100vh - 76px);
    }
}
