/* ============================================================== */
/* Notifications Bell - Portal do Cliente RP Info                  */
/* ============================================================== */

/* Container */
.notif-bell-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* Nav item alignment */
.nav-item > .notif-bell-container {
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bell Button */
.notif-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-secondary, #6b7280);
}

.notif-bell-btn:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.05));
}

.notif-bell-btn i {
    font-size: 22px;
    transition: transform 0.2s ease;
}

/* Badge */
.notif-bell-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #DC2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    display: none;
    animation: notifBadgeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-bell-badge.visible {
    display: block;
}

/* Pulse animation when new notification arrives */
.notif-bell-badge.pulse {
    animation: notifPulse 1.5s ease-in-out infinite;
}

.notif-bell-btn.ringing i {
    animation: notifRing 0.8s ease-in-out;
}

/* Dropdown */
.notif-bell-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 420px;
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color, #e5e7eb);
    z-index: 9999;
    display: none;
    overflow: hidden;
    transform-origin: top right;
    animation: notifDropIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-bell-dropdown.open {
    display: block;
}

/* Dropdown Header */
.notif-bell-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-bell-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #111827);
}

.notif-bell-header .notif-total-badge {
    background: var(--bg-primary-light, #EFF6FF);
    color: var(--text-primary-color, #1E40AF);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Dropdown Body */
.notif-bell-body {
    overflow-y: auto;
    max-height: 340px;
    padding: 8px;
}

/* Notification Item */
.notif-bell-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.notif-bell-item:hover {
    background: var(--bg-hover, #f3f4f6);
    text-decoration: none;
    color: inherit;
}

.notif-bell-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.notif-bell-item-icon.icon-tickets {
    background: #FEE2E2;
    color: #DC2626;
}

.notif-bell-item-icon.icon-attendances {
    background: #DBEAFE;
    color: #1E40AF;
}

.notif-bell-item-icon.icon-trainings {
    background: #FEF3C7;
    color: #D97706;
}

.notif-bell-item-icon.icon-informatives {
    background: #D1FAE5;
    color: #059669;
}

.notif-bell-item-icon.icon-visits {
    background: #E0E7FF;
    color: #4F46E5;
}

.notif-bell-item-icon.icon-docs {
    background: #F3E8FF;
    color: #7C3AED;
}

.notif-bell-item-icon.icon-deployments {
    background: #FFEDD5;
    color: #EA580C;
}

.notif-bell-item-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.notif-bell-item-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #374151);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.notif-bell-item-count {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: #DC2626;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Empty State */
.notif-bell-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted, #9ca3af);
}

.notif-bell-empty i {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.notif-bell-empty p {
    margin: 0;
    font-size: 14px;
}

/* Animations */
@keyframes notifBadgeIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes notifPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes notifRing {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(9deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
    100% { transform: rotate(0deg); }
}

@keyframes notifDropIn {
    0% { opacity: 0; transform: scale(0.95) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Dark Mode */
[data-theme="dark"] .notif-bell-btn,
.dark-mode .notif-bell-btn,
body.dark .notif-bell-btn {
    color: #d1d5db;
}

[data-theme="dark"] .notif-bell-btn:hover,
.dark-mode .notif-bell-btn:hover,
body.dark .notif-bell-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .notif-bell-dropdown,
.dark-mode .notif-bell-dropdown,
body.dark .notif-bell-dropdown {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .notif-bell-header,
.dark-mode .notif-bell-header,
body.dark .notif-bell-header {
    border-color: #374151;
}

[data-theme="dark"] .notif-bell-header h4,
.dark-mode .notif-bell-header h4,
body.dark .notif-bell-header h4 {
    color: #f9fafb;
}

[data-theme="dark"] .notif-bell-header .notif-total-badge,
.dark-mode .notif-bell-header .notif-total-badge,
body.dark .notif-bell-header .notif-total-badge {
    background: #1e3a5f;
    color: #93c5fd;
}

[data-theme="dark"] .notif-bell-item:hover,
.dark-mode .notif-bell-item:hover,
body.dark .notif-bell-item:hover {
    background: #374151;
}

[data-theme="dark"] .notif-bell-item-text,
.dark-mode .notif-bell-item-text,
body.dark .notif-bell-item-text {
    color: #e5e7eb;
}

[data-theme="dark"] .notif-bell-empty,
.dark-mode .notif-bell-empty,
body.dark .notif-bell-empty {
    color: #6b7280;
}

/* Responsive */
@media (max-width: 576px) {
    .notif-bell-dropdown {
        width: 290px;
        right: -60px;
    }
}
