/**
 * Notification System Styles
 * ==========================
 */

/* Notification Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

/* Toast Notifications */
.toast-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border-left: 4px solid #0d6efd;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
    pointer-events: all;
    font-size: 14px;
}

.toast-notification.toast-success {
    border-left-color: #198754;
}

.toast-notification.toast-error,
.toast-notification.toast-danger {
    border-left-color: #dc3545;
}

.toast-notification.toast-warning {
    border-left-color: #ffc107;
    color: #333;
}

.toast-notification.toast-info {
    border-left-color: #0d6efd;
}

.toast-notification.toast-login {
    border-left-color: #20c997;
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    color: white;
}

.toast-notification.toast-registration {
    border-left-color: #6f42c1;
    background: linear-gradient(135deg, #6f42c1 0%, #0d6efd 100%);
    color: white;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.toast-content i {
    font-size: 18px;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.5);
    padding: 0;
    margin-left: 10px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: rgba(0, 0, 0, 0.8);
}

.toast-notification.toast-login .toast-close,
.toast-notification.toast-registration .toast-close {
    color: rgba(255, 255, 255, 0.7);
}

.toast-notification.toast-login .toast-close:hover,
.toast-notification.toast-registration .toast-close:hover {
    color: rgba(255, 255, 255, 1);
}

/* Fade out animation */
.toast-notification.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Notification Bell in Navbar */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 0 15px;
    font-size: 20px;
    color: #333;
}

.notification-bell i {
    transition: transform 0.2s;
}

.notification-bell:hover i {
    transform: scale(1.1);
}

/* Unread Badge */
.unread-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    max-height: 500px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    overflow: hidden;
    margin-top: 10px;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.notification-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 15px;
}

.btn-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    padding: 0;
    transition: color 0.2s;
}

.btn-close:hover {
    color: #333;
}

/* Notification List */
.notification-list {
    overflow-y: auto;
    max-height: 380px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Notification Item */
.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-content {
    flex: 1;
    margin-right: 10px;
}

.notification-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.notification-message {
    margin: 4px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.notification-time {
    color: #999;
    font-size: 12px;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.notification-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    padding: 4px 6px;
    transition: color 0.2s;
}

.notification-actions button:hover {
    color: #0d6efd;
}

.btn-delete:hover {
    color: #dc3545;
}

/* Notification Footer */
.notification-footer {
    padding: 10px 15px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

/* No Notifications Message */
.no-notifications {
    padding: 30px 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .notification-dropdown {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60vh;
        border-radius: 12px 12px 0 0;
        margin: 0;
    }

    .notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast-notification {
        max-width: 100%;
    }
}
