/* ============================================
   NOTIFICATIONS CSS
   Notification bell dropdown and related components
   Extracted from base.html - Session 6 (Jan 2026)
   ============================================ */

/* ============================================
   NOTIFICATION BELL
   ============================================ */

.notification-bell {
    position: relative;
}

.notification-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
}


.notification-bell-btn:hover {
    background: transparent !important;
    color: var(--text-primary);
}

.notification-bell-btn:hover svg {
    fill: var(--primary, #FFC400);
}

.notification-bell-btn svg {
    width: 24px;
    height: 24px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    font-size: 9px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    color: white;
    background: #ef4444;
    border-radius: 8px;
    border: 1.5px solid var(--bg-primary, #fff);
    z-index: 2;
}

/* Red bell when there are notifications */
.notification-bell.has-notifications .notification-bell-btn svg {
    fill: none;
    stroke: #ef4444;
    stroke-width: 2.5;
}

.notification-bell.has-notifications .notification-bell-btn:hover svg {
    fill: none;
    stroke: #dc2626;
    stroke-width: 2.5;
}

/* Wiggle animation for bell with notifications */
.notification-bell.has-notifications .notification-bell-btn svg {
    animation: bell-wiggle 1s ease-in-out 3;
    transform-origin: top center;
}

@keyframes bell-wiggle {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-12deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-8deg); }
    50% { transform: rotate(5deg); }
    60% { transform: rotate(-3deg); }
    70% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */

.notification-dropdown {
    width: 360px;
    max-height: 480px;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    background: var(--bg-primary, #fff);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.notification-header h6 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* ============================================
   NOTIFICATION SECTIONS
   ============================================ */

.notification-section {
    max-height: 320px;
    overflow-y: auto;
}

.notification-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* ============================================
   NOTIFICATION ITEMS
   ============================================ */

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Task notification item: link + dismiss side by side */
.task-notification-item {
    position: relative;
    padding-right: 2.25rem;
}

.task-notification-item .notification-item-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.notification-dismiss-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.task-notification-item:hover .notification-dismiss-btn {
    opacity: 1;
}

.notification-dismiss-btn:hover {
    color: var(--text-primary);
}

/* ============================================
   NOTIFICATION FOOTER
   ============================================ */

.notification-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.notification-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.notification-view-all:hover {
    color: var(--primary-dark);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.notification-empty p {
    margin: 0.75rem 0 0.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

.notification-empty span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
}
