/* =====================================================
   CommerceFlow — Notification System Styles
   ===================================================== */

/* ─── Badge no header bell ─── */
.notif-bell-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: #6b7280;
    font-size: 18px;
    transition: background 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.notif-bell-btn:hover { background: #f3f4f6; }
.notif-bell-btn .notif-count {
    position: absolute;
    top: 2px; right: 2px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    line-height: 1;
    pointer-events: none;
}
.notif-bell-btn .notif-count[data-zero="true"] { display: none; }

/* ─── Badge no menu lateral ─── */
.menu-item .menu-notif-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.menu-item .menu-notif-badge[data-zero="true"] { display: none; }

/* ─── Painel de notificações (overlay) ─── */
#notifPanel {
    position: fixed;
    top: 0; right: 0;
    width: 360px; max-width: 100vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}
#notifPanel.open { transform: translateX(0); }

#notifPanelOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9998;
    display: none;
}
#notifPanelOverlay.open { display: block; }

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.notif-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    display: flex; align-items: center; gap: 8px;
}
.notif-panel-actions {
    display: flex; gap: 8px; align-items: center;
}
.notif-panel-close {
    background: none; border: none; cursor: pointer;
    color: #6b7280; font-size: 20px; padding: 4px;
    line-height: 1;
}
.notif-panel-close:hover { color: #111827; }
.notif-mark-all {
    background: none; border: none; cursor: pointer;
    color: var(--primary); font-size: 12px; font-weight: 600;
    padding: 4px 8px; border-radius: 6px;
}
.notif-mark-all:hover { background: var(--primary-tint); }

.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.notif-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 14px;
    gap: 8px;
}
.notif-empty i { font-size: 40px; }

/* ─── Cada notificação ─── */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #f3f4f6;
}
.notif-item:hover { background: #f9fafb; }
.notif-item.unread { background: var(--primary-tint); }
.notif-item.unread:hover { background: var(--primary-tint-2); }

.notif-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}
.notif-icon.novo_pedido    { background: #fef3c7; }
.notif-icon.separado       { background: #dcfce7; }
.notif-icon.pago           { background: #d1fae5; }
.notif-icon.entregue       { background: #d1fae5; }
.notif-icon.reposicao      { background: #ede9fe; }
.notif-icon.comprovante    { background: #fee2e2; }
.notif-icon.default        { background: #f3f4f6; }

.notif-body { flex: 1; min-width: 0; }
.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-msg {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}
.notif-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.notif-unread-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}

/* ─── Mobile ajustes ─── */
@media (max-width: 768px) {
    #notifPanel { width: 100vw; }
}
