/* UNA Notification System Styles */

/* Toast Notifications */
.una-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #046f5b;
    animation: slideInRight 0.3s ease;
    transition: all 0.3s ease;
}

.una-toast:hover {
    transform: translateX(-5px);
}

.una-toast--success {
    border-left-color: #28a745;
}

.una-toast--error {
    border-left-color: #dc3545;
}

.una-toast--warning {
    border-left-color: #ffc107;
}

.una-toast--info {
    border-left-color: #17a2b8;
}

.una-toast__content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.una-toast__icon {
    font-size: 20px;
    color: #046f5b;
}

.una-toast--success .una-toast__icon {
    color: #28a745;
}

.una-toast--error .una-toast__icon {
    color: #dc3545;
}

.una-toast--warning .una-toast__icon {
    color: #ffc107;
}

.una-toast--info .una-toast__icon {
    color: #17a2b8;
}

.una-toast__message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.una-toast__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s ease;
}

.una-toast__close:hover {
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Header Notification Dropdown Enhancements */
.una-content__header__popup--notification {
    max-width: 380px;
    width: 380px;
}

.una-content__header__popup--notification .una-content__header__popup__items {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px 8px;
}

.notification-item:hover {
    background-color: #f8f9fa;
    transform: translateX(-2px);
}

.notification-item.unread {
    background-color: #e8f5e8;
    border-right: 3px solid #046f5b;
}

.notification-item.high-priority {
    border-right: 3px solid #dc3545;
}

.notification-item.high-priority.unread {
    background-color: #fdf2f2;
}

.notification-item .una-content__header__popup__link {
    position: relative;
    padding: 12px 40px 12px 15px;
}

.notification-item .una-content__header__popup__item__img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #046f5b, #065950);
    border-radius: 50%;
    margin-left: 12px;
}

.notification-item .notification-icon {
    color: #fff;
    font-size: 18px;
}

.notification-item .una-content__header__popup__item__content {
    flex: 1;
    min-width: 0;
}

.notification-item .una-content__header__popup__item__title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.notification-item .una-content__header__popup__item__time {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    white-space: nowrap;
}

.notification-item .una-content__header__popup__item__desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    position: relative;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.unread-indicator {
    position: absolute;
    top: 2px;
    left: -8px;
    width: 6px;
    height: 6px;
    background: #046f5b;
    border-radius: 50%;
}

.dismiss-notification-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
}

.notification-item:hover .dismiss-notification-btn {
    opacity: 1;
}

.dismiss-notification-btn:hover {
    background: #f0f0f0;
    color: #dc3545;
}

.view-all-item .view-all-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: #046f5b;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    transition: all 0.2s ease;
}

.view-all-item .view-all-link:hover {
    background: #e9ecef;
    color: #034139;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.loading-item,
.error-item {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

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

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.notifications-title {
    font-size: 28px;
    color: #333;
    margin: 0;
}

.notifications-actions {
    display: flex;
    gap: 12px;
}

.mark-all-read-btn,
.load-more-notifications-btn {
    background: #046f5b;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mark-all-read-btn:hover,
.load-more-notifications-btn:hover {
    background: #034139;
    transform: translateY(-1px);
}

.load-more-notifications-btn {
    margin: 20px auto;
    display: block;
    width: fit-content;
}

.notification-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.notification-category-filter {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.notification-category-filter:hover,
.notification-category-filter.active {
    background: #046f5b;
    color: #fff;
    border-color: #046f5b;
}

.notifications-list-container {
    min-height: 300px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notification-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.notification-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.notification-card.unread {
    border-right: 4px solid #046f5b;
    background: linear-gradient(90deg, #e8f5e8 0%, #fff 20%);
}

.notification-card.high-priority {
    border-right: 4px solid #dc3545;
}

.notification-card.high-priority.unread {
    background: linear-gradient(90deg, #fdf2f2 0%, #fff 20%);
}

.notification-card {
    display: flex;
    gap: 16px;
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #046f5b, #065950);
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-icon i {
    color: #fff;
    font-size: 20px;
}

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

.notification-header {
    margin-bottom: 8px;
}

.notification-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.notification-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
}

.notification-message {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.notification-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #046f5b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.notification-action:hover {
    color: #034139;
    text-decoration: underline;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.btn-mark-read,
.btn-dismiss {
    background: none;
    border: 1px solid #dee2e6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.btn-mark-read:hover {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.btn-dismiss:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

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

.empty-notifications .empty-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-notifications h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #999;
}

.empty-notifications p {
    font-size: 16px;
    margin: 0;
}

/* Header Badge Improvements */
.una-content__header__badge {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    position: absolute;
    top: -8px;
    left: -8px;
    animation: pulse 2s infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .una-content__header__popup--notification {
        width: 320px;
        max-width: calc(100vw - 40px);
    }
    
    .notifications-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .notifications-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .mark-all-read-btn {
        flex: 1;
        justify-content: center;
    }
    
    .notification-filters {
        justify-content: center;
    }
    
    .notification-card {
        padding: 16px;
    }
    
    .notification-icon {
        width: 40px;
        height: 40px;
    }
    
    .notification-icon i {
        font-size: 18px;
    }
    
    .notification-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    .una-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .notifications-page {
        padding: 10px;
    }
    
    .notifications-title {
        font-size: 24px;
    }
    
    .notification-card {
        flex-direction: column;
        text-align: center;
    }
    
    .notification-content {
        text-align: right;
    }
    
    .notification-actions {
        flex-direction: row;
        justify-content: center;
        opacity: 1;
    }
}

/* RTL Support */
[dir="rtl"] .notification-item {
    border-right: none;
    border-left: 3px solid #046f5b;
}

[dir="rtl"] .notification-item.high-priority {
    border-left: 3px solid #dc3545;
}

[dir="rtl"] .notification-card.unread {
    border-right: none;
    border-left: 4px solid #046f5b;
}

[dir="rtl"] .notification-card.high-priority {
    border-left: 4px solid #dc3545;
}

[dir="rtl"] .notification-item .una-content__header__popup__item__img {
    margin-right: 12px;
    margin-left: 0;
}

[dir="rtl"] .dismiss-notification-btn {
    left: auto;
    right: 8px;
}

[dir="rtl"] .unread-indicator {
    left: auto;
    right: -8px;
}

[dir="rtl"] .una-content__header__badge {
    left: auto;
    right: -8px;
}

/* Dark Mode Support */
.dark-theme .notification-card {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

.dark-theme .notification-title {
    color: #fff;
}

.dark-theme .notification-message {
    color: #ccc;
}

.dark-theme .notification-item:hover {
    background-color: #333;
}

.dark-theme .una-toast {
    background: #2a2a2a;
    color: #e0e0e0;
}

.dark-theme .una-toast__message {
    color: #e0e0e0;
}

/* Accessibility Improvements */
.notification-item:focus,
.notification-card:focus {
    outline: 2px solid #046f5b;
    outline-offset: 2px;
}

.btn-mark-read:focus,
.btn-dismiss:focus,
.dismiss-notification-btn:focus {
    outline: 2px solid #046f5b;
    outline-offset: 2px;
}

/* Loading States */
.notifications-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #046f5b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Priority Indicators */
.priority-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #046f5b;
}

.priority-indicator.high {
    background: #dc3545;
    animation: pulse 2s infinite;
}

.priority-indicator.urgent {
    background: #ff4757;
    animation: urgentPulse 1s infinite;
}

@keyframes urgentPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}
