/**
 * Moksha Hub - Notifications Styles
 */

/* Notification Dropdown */
.notification-dropdown {
    position: fixed;
    width: 380px;
    max-width: 90vw;
    max-height: 500px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1050;
}

.notification-dropdown.show {
    display: flex;
}

.notification-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-dropdown-header h6 {
    font-weight: 600;
    color: #212529;
}

.notification-dropdown-body {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-dropdown-footer {
    padding: 8px 16px;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

/* Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f5;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
    position: relative;
}

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

.notification-item.unread {
    background-color: #e7f3ff;
}

.notification-item.unread:hover {
    background-color: #d0e7ff;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    font-size: 16px;
}

.notification-item.unread .notification-icon {
    background: #fff;
}

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

.notification-message {
    font-size: 14px;
    line-height: 1.4;
    color: #212529;
    margin-bottom: 4px;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
}

.notification-order {
    font-weight: 500;
    color: #0d6efd;
}

.notification-time {
    color: #6c757d;
}

.notification-unread-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: #0d6efd;
    border-radius: 50%;
    margin-top: 6px;
}

/* Badge on button */
#notifBtn .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.35rem;
}

/* Page: Notifications List */
.notifications-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.notifications-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.notifications-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.notifications-list {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.notifications-list .notification-item {
    border-bottom: 1px solid #dee2e6;
}

.notifications-list .notification-item:last-child {
    border-bottom: none;
}

.notifications-empty {
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.notifications-empty i {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 16px;
}

/* Dark mode support */
[data-theme="dark"] .notification-dropdown {
    background: #212529;
    border-color: #495057;
}

[data-theme="dark"] .notification-dropdown-header,
[data-theme="dark"] .notification-dropdown-footer {
    border-color: #495057;
}

[data-theme="dark"] .notification-dropdown-header h6 {
    color: #f8f9fa;
}

[data-theme="dark"] .notification-item {
    border-color: #495057;
    color: #f8f9fa;
}

[data-theme="dark"] .notification-item:hover {
    background-color: #343a40;
}

[data-theme="dark"] .notification-item.unread {
    background-color: #1a3a52;
}

[data-theme="dark"] .notification-item.unread:hover {
    background-color: #255073;
}

[data-theme="dark"] .notification-icon {
    background: #343a40;
}

[data-theme="dark"] .notification-item.unread .notification-icon {
    background: #495057;
}

[data-theme="dark"] .notification-message {
    color: #f8f9fa;
}

[data-theme="dark"] .notification-meta {
    color: #adb5bd;
}

[data-theme="dark"] .notification-time {
    color: #adb5bd;
}

[data-theme="dark"] .notifications-list {
    background: #212529;
    border-color: #495057;
}

[data-theme="dark"] .notifications-list .notification-item {
    border-color: #495057;
}

/* Responsive */
@media (max-width: 576px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        right: 10px;
    }
    
    .notification-dropdown-body {
        max-height: 300px;
    }
}
