/**
 * Firebase Notification System Styles
 */

/* Notification Container */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

/* Toast Notification */
.notification-toast {
    background: white;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: auto;
    animation: slideIn 0.3s ease forwards;
}

.notification-toast.show {
    opacity: 1;
    transform: translateX(0);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-toast .toast-content {
    flex: 1;
}

.notification-toast h6 {
    margin: 0 0 4px 0;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.notification-toast p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.notification-toast .btn-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.notification-toast .btn-close:hover {
    opacity: 1;
}

/* Different notification types */
.notification-toast.success {
    border-left-color: #28a745;
}

.notification-toast.warning {
    border-left-color: #ffc107;
}

.notification-toast.error {
    border-left-color: #dc3545;
}

.notification-toast.info {
    border-left-color: #17a2b8;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.notification-bell i {
    font-size: 20px;
    color: #333;
    transition: color 0.2s;
}

.notification-bell:hover i {
    color: #007bff;
}

/* Unread Badge */
.unread-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    width: 360px;
    max-height: 500px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    margin-top: 8px;
}

.notification-dropdown.show {
    display: flex;
}

.notification-header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.notification-header .btn-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.notification-header .btn-close:hover {
    opacity: 1;
}

/* Notification List */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 380px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f9f9f9;
}

.notification-item.unread {
    background-color: #f0f7ff;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #007bff;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    color: #999;
    font-size: 12px;
}

.notification-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.notification-actions button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.2s;
}

.notification-actions button:hover {
    background-color: #e0e0e0;
    color: #333;
}

.btn-mark-read {
    color: #17a2b8;
}

.btn-mark-read:hover {
    background-color: #e0f7fa;
    color: #0097a7;
}

.btn-delete {
    color: #dc3545;
}

.btn-delete:hover {
    background-color: #ffe5e5;
    color: #c82333;
}

.notification-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

/* Loading State */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: #999;
}

.loading-spinner p {
    margin: 12px 0 0 0;
    font-size: 13px;
}

/* Empty State */
.empty-state {
    padding: 40px 16px;
    text-align: center;
    color: #999;
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .notification-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 70vh;
        margin-top: 0;
    }

    .notification-toast {
        max-width: calc(100vw - 40px);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification-toast {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .notification-toast h6 {
        color: #fff;
    }

    .notification-toast p {
        color: #bbb;
    }

    .notification-dropdown {
        background: #2a2a2a;
        border-color: #444;
    }

    .notification-header {
        border-bottom-color: #444;
    }

    .notification-header h6 {
        color: #fff;
    }

    .notification-item {
        border-bottom-color: #444;
    }

    .notification-item:hover {
        background-color: #333;
    }

    .notification-item.unread {
        background-color: #1a3a52;
    }

    .notification-title {
        color: #fff;
    }

    .notification-message {
        color: #bbb;
    }

    .notification-footer {
        border-top-color: #444;
        background-color: #333;
    }
}
