/* Notification System Styles */

/* Notification Bell */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
    box-shadow: 0 4px 15px rgba(26, 147, 111, 0.2);
}

.notification-bell:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 147, 111, 0.3);
}

.notification-bell i {
    color: white;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.notification-bell:hover i {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Notification Dropdown */
.notification-dropdown {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.notification-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 30px;
    width: 16px;
    height: 16px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

/* Notification Header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.notification-actions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Notification List */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0fdf4;
    border-left: 4px solid var(--primary);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.notification-item.unread .notification-icon {
    background: var(--primary);
    color: white;
}

.notification-item.read .notification-icon {
    background: #e9ecef;
    color: #6c757d;
}

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

.notification-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.notification-message {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: #999;
}

.notification-actions {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.notification-actions .btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
}

/* Notification Footer */
.notification-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.view-all-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Loading and Empty States */
.loading-state, .no-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
}

.loading-state i, .no-notifications i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
    opacity: 0.7;
}

.loading-state p, .no-notifications p {
    margin: 0;
    font-size: 0.9rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    z-index: 10001;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInFromRight 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-info {
    border-left-color: var(--primary);
}

.toast.hide {
    animation: slideOutToRight 0.3s ease forwards;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.toast-content i {
    font-size: 1.1rem;
}

.toast-success .toast-content i {
    color: var(--success);
}

.toast-error .toast-content i {
    color: var(--danger);
}

.toast-warning .toast-content i {
    color: var(--warning);
}

.toast-info .toast-content i {
    color: var(--primary);
}

.toast-content span {
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.toast-close:hover {
    background: #f8fafc;
    color: var(--dark);
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-dropdown {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .notification-dropdown::before {
        right: 20px;
    }
    
    .notification-item {
        padding: 12px 15px;
    }
    
    .notification-header {
        padding: 15px 15px 10px;
    }
    
    .notification-footer {
        padding: 10px 15px;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .notification-bell {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .notification-bell i {
        font-size: 1rem;
    }
    
    .notification-badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .notification-dropdown {
        top: 70px;
    }
    
    .notification-item {
        padding: 10px 12px;
    }
    
    .notification-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .notification-title {
        font-size: 0.85rem;
    }
    
    .notification-message {
        font-size: 0.8rem;
    }
    
    .notification-time {
        font-size: 0.7rem;
    }
}
