/**
 * ============================================
 * NOTIFICATION UI STYLES
 * ============================================
 */

/* Notification Bell Container */
.notification-bell-container {
    position: relative;
    display: inline-block;
    margin: 0 15px;
}

.notification-bell-button {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
}

.notification-bell-button:hover {
    color: #007bff;
    transform: scale(1.1);
}

.notification-bell-button.has-notifications {
    color: #ff4444;
    animation: pulse 2s infinite;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: badge-pop 0.3s ease;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.shake {
    animation: shake 0.5s ease;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Badge Pop Animation */
@keyframes badge-pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* In-Page Notification Toast */
.notification-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    min-width: 320px;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slide-in-right 0.3s ease;
    overflow: hidden;
    border-left: 4px solid #007bff;
}

.notification-toast-content {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    gap: 12px;
}

.notification-toast-icon {
    font-size: 24px;
    color: #007bff;
    flex-shrink: 0;
}

.notification-toast-body {
    flex: 1;
}

.notification-toast-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

.notification-toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.notification-toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #999;
    font-size: 16px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.notification-toast-close:hover {
    color: #333;
}

/* Toast Types */
.notification-toast.success {
    border-left-color: #28a745;
}

.notification-toast.success .notification-toast-icon {
    color: #28a745;
}

.notification-toast.warning {
    border-left-color: #ffc107;
}

.notification-toast.warning .notification-toast-icon {
    color: #ffc107;
}

.notification-toast.error {
    border-left-color: #dc3545;
}

.notification-toast.error .notification-toast-icon {
    color: #dc3545;
}

.notification-toast.info {
    border-left-color: #17a2b8;
}

.notification-toast.info .notification-toast-icon {
    color: #17a2b8;
}

/* Slide In Animation */
@keyframes slide-in-right {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fade Out Animation */
.notification-toast.fade-out {
    animation: fade-out 0.3s ease forwards;
}

@keyframes fade-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* Notification Panel (Dropdown) */
.notification-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    overflow: hidden;
    display: none;
    z-index: 1000;
}

.notification-panel.show {
    display: block;
    animation: dropdown-fade-in 0.2s ease;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-panel-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-panel-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.notification-panel-clear {
    background: transparent;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
}

.notification-panel-clear:hover {
    text-decoration: underline;
}

.notification-panel-body {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e7f3ff;
}

.notification-item-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.notification-item-message {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.notification-item-time {
    font-size: 11px;
    color: #999;
}

.notification-panel-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.notification-panel-empty i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Remember Me Checkbox on Login Page */
.remember-me-container {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.remember-me-container input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.remember-me-container label {
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-toast {
        top: 60px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .notification-panel {
        width: 100vw;
        max-width: 360px;
        right: -20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification-toast {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .notification-toast-title {
        color: #e2e8f0;
    }
    
    .notification-toast-message {
        color: #cbd5e0;
    }
    
    .notification-panel {
        background: #2d3748;
    }
    
    .notification-panel-header {
        background: #1a202c;
        border-bottom-color: #4a5568;
    }
    
    .notification-panel-title {
        color: #e2e8f0;
    }
    
    .notification-item {
        border-bottom-color: #4a5568;
    }
    
    .notification-item:hover {
        background: #1a202c;
    }
    
    .notification-item.unread {
        background: #2c5282;
    }
}
