﻿/* Reset forte para não herdar Bootstrap/UAs */
.nc-reset,
.nc-reset:focus,
.nc-reset:hover,
.nc-reset:active {
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: inherit;
    font: inherit;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

/* Sino no header: sem caixa, herdando a cor do nav (branca) */
.notif-root {
    position: relative;
    display: inline-block;
}

.notif-bell {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: inherit;
}

    .notif-bell i {
        font-size: 18px;
    }

.navbar .notif-bell {
    color: #fff;
}

.notif-bell:hover {
    opacity: .9;
}

.notif-bell:focus-visible {
    outline: 2px solid rgba(255,255,255,.35) !important;
    outline-offset: 2px;
}

/* Badge */
.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: #8a005e;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    border: 1px solid rgba(0,0,0,.15);
}

/* Painel */
.notif-panel {
    position: absolute;
    top: 44px;
    right: 0;
    width: 360px;
    max-height: 70vh;
    background: #fff;
    border: 1px solid #e6e6e9;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0,0,0,.16);
    overflow: hidden;
    z-index: 1050;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #ececf0;
}

.notif-title {
    font-family: 'Josefin Sans';
    font-size: 18px;
    color: #222;
}

/* Botão “Mark all as read” como link */
.notif-markall {
    color: #9a9aa3;
    font-size: 14px;
}

    .notif-markall:hover {
        color: #6b6b76;
        text-decoration: underline;
    }

/* Lista */
.notif-list {
    padding: 6px 8px 10px 8px;
    overflow-y: auto;
    max-height: calc(70vh - 48px);
}

.notif-item {
    display: grid;
    grid-template-columns: 14px 1fr auto; 
    gap: 8px;
    align-items: center; 
    padding: 10px 8px;
    border-bottom: 1px solid #f2f6f6;
    min-height: 3em;
    max-height: 10em;
}

    .notif-item:last-child {
        border-bottom: none;
    }

    .notif-item.unread .notif-line1 {
        font-weight: 600;
    }

/* Bolinha indicador */
.notif-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8a005e;
    justify-self: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity .15s ease;
}

.notif-item.unread .notif-dot {
    visibility: visible;
    opacity: 1;
}

/* Content (texto) */
.notif-content {
    display: block;
}

/* Linha título */
.notif-line1 {
    font-size: 15px;
    color: #1f1f1f;
}

/* Linha descrição + botão “…” dentro */
.notif-line2 {
    margin-top: 2px;
    font-size: 13px;
    color: #6b6b76;
    text-decoration: none;
    display: inline; /* para botão ficar ao lado */
}

/* Botão expandir “…” */
.notif-expand-btn {
    background: none;
    border: none;
    color: #6b6b76;
    cursor: pointer;
    font-size: 13px;
    padding: 0 4px;
}

    .notif-expand-btn:hover,
    .notif-expand-btn:focus {
        color: #444;
        outline: none;
    }

.notif-content.truncated {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1; 
    max-height: calc(1.2em * 1); 
}


.notif-item.expanded .notif-content {
    -webkit-line-clamp: unset;
    max-height: none;
}

.notif-item.expanded .notif-line2 {
    display: block; /* permitir quebra em múltiplas linhas */
}

/* Botão de deletar */
.notif-del {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: #8f8f99;
}

    .notif-del:hover {
        background: #f5f5f9;
        color: #444;
    }

/* Responsivo */
@media (max-width: 420px) {
    .notif-panel {
        width: 92vw;
        right: -8px;
    }
}

/* Tema escuro */
[data-theme="dark"] .notif-panel {
    background: #151515;
    border-color: #2a2a2a;
}

[data-theme="dark"] .notif-title {
    color: #e7e7e7;
}

[data-theme="dark"] .notif-markall {
    color: #b5b5bd;
}

[data-theme="dark"] .notif-item {
    border-bottom-color: #232323;
}

[data-theme="dark"] .notif-line1 {
    color: #e7e7e7;
}

[data-theme="dark"] .notif-line2 {
    color: #bdbdc6;
}

[data-theme="dark"] .notif-del:hover {
    background: #1f1f1f;
    color: #ddd;
}
