/* ========================================
   SGT FLOW - NOTIFICATION STYLES
   Modern & Fluid Animations
   ======================================== */

/* ========================================
   NOTIFICATION DROPDOWN
   ======================================== */
.notification-dropdown {
    width: 380px;
    max-height: 450px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 26, 77, 0.2);
    animation: dropdownSlide 0.2s ease-out;
    z-index: 1050 !important;
    background-color: var(--card-bg);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.1) 0%, transparent 100%);
}

.notification-header h6 {
    font-weight: 600;
    color: var(--text-color);
}

.notification-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
    background: rgba(46, 196, 182, 0.03);
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

/* ========================================
   NOTIFICATION ITEMS
   ======================================== */
.notification-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.notification-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-item:hover::before {
    transform: scaleY(1);
}

.notification-item:hover {
    background: linear-gradient(90deg, rgba(46, 196, 182, 0.08) 0%, transparent 100%);
    transform: translateX(4px);
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(46, 196, 182, 0.12) 0%, rgba(46, 196, 182, 0.05) 100%);
    font-weight: 500;
}

.notification-item.unread::before {
    transform: scaleY(1);
    background: linear-gradient(180deg, #2EC4B6 0%, #5DD3D0 100%);
}

.notification-item.unread:hover {
    background: linear-gradient(90deg, rgba(46, 196, 182, 0.18) 0%, rgba(46, 196, 182, 0.08) 100%);
}

.notification-content {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    color: var(--text-color);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-time i {
    font-size: 0.7rem;
    color: var(--accent-color);
}

/* ========================================
   NOTIFICATION TYPE BADGES
   ======================================== */
.notification-type {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-type-status {
    background: linear-gradient(135deg, #5DD3D0 0%, #2EC4B6 100%);
    color: white;
}

.notification-type-comment {
    background: linear-gradient(135deg, #C5D93D 0%, #a8c41a 100%);
    color: #001A4D;
}

.notification-type-log {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

/* ========================================
   NOTIFICATION BADGE (BELL ICON)
   ======================================== */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 20px;
    background: linear-gradient(135deg, #C5D93D 0%, #a8c41a 100%);
    color: #001A4D;
    z-index: 10;
    pointer-events: none;
}

.notification-badge.has-new {
    animation: none;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(197, 217, 61, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 4px 16px rgba(197, 217, 61, 0.6);
    }
}

/* ========================================
   NOTIFICATION POPUP (TOAST)
   ======================================== */
.notification-popup {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 360px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-toast {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 26, 77, 0.2);
    overflow: hidden;
    animation: toastSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-toast:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 40px rgba(0, 26, 77, 0.25);
}

.notification-toast.new-notification {
    animation: toastSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1),
               toastGlow 2s ease-in-out 3;
}

@keyframes toastGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 26, 77, 0.2);
    }
    50% {
        box-shadow: 0 8px 32px rgba(46, 196, 182, 0.4),
                    0 0 0 2px rgba(46, 196, 182, 0.3);
    }
}

.notification-toast .toast-header {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    color: var(--text-color);
}

.notification-toast .toast-body {
    padding: 14px 16px;
    color: var(--text-color);
}

/* ========================================
   NOTIFICATION DROPDOWN BUTTON
   ======================================== */
#notificationDropdown {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border: none !important;
    background: transparent;
}

#notificationDropdown:hover {
    background: rgba(46, 196, 182, 0.15);
    text-decoration: none !important;
}

#notificationDropdown:focus {
    text-decoration: none !important;
    outline: none;
    box-shadow: none !important;
}

#notificationDropdown.has-unread {
    animation: bellWiggle 0.5s ease-in-out;
}

@keyframes bellWiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(-10deg); }
    75% { transform: rotate(5deg); }
}

#notificationDropdown i {
    font-size: 1.2rem;
}

#notificationDropdown:hover i {
    color: var(--accent-color);
}

/* ========================================
   NOTIFICATION COUNT BADGES
   ======================================== */
.notification-count.has-unread,
.notification-sidebar-count.has-unread {
    animation: countPulse 1.5s infinite;
    background: linear-gradient(135deg, #C5D93D 0%, #a8c41a 100%) !important;
    color: #001A4D !important;
}

@keyframes countPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========================================
   SIDEBAR NOTIFICATION BADGE
   ======================================== */
.notification-sidebar-count,
.unread-count {
    background: linear-gradient(135deg, #C5D93D 0%, #a8c41a 100%);
    color: #001A4D;
    font-weight: 700;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(197, 217, 61, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 22px;
    height: auto;
    line-height: 1.4;
    text-align: center;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-sidebar-count:hover,
.unread-count:hover {
    transform: scale(1.1);
}

/* ========================================
   DARK THEME ADJUSTMENTS
   ======================================== */
body.dark-theme .notification-dropdown {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-theme .notification-header,
body.dark-theme .notification-footer {
    border-color: var(--border-color);
}

body.dark-theme .notification-item {
    border-color: var(--border-color);
}

body.dark-theme .notification-toast {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-theme .notification-toast .toast-header {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.15) 0%, transparent 100%);
    border-color: var(--border-color);
}

body.dark-theme .notification-toast .toast-header .btn-close {
    filter: invert(1);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 576px) {
    .notification-dropdown {
        width: 320px;
        position: fixed !important;
        left: auto !important;
        right: 10px !important;
        top: 70px !important;
        transform: none !important;
    }
    
    .notification-popup {
        width: calc(100% - 40px);
        right: 20px;
        top: 70px;
    }
    
    .notification-toast {
        width: 100%;
    }
}

/* ========================================
   NOTIFICATION LIST PAGE STYLES
   ======================================== */
.notifications-page .notification-item {
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
}

.notifications-page .notification-item:hover {
    border-color: var(--accent-color);
}

.notifications-page .notification-item.unread {
    border-left: 4px solid var(--accent-color);
}

/* Empty state */
.notifications-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.notifications-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--accent-color);
}

.notifications-empty h5 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.notifications-empty p {
    color: var(--text-muted);
}