/* ============================================================
   ADVANCED NOTIFICATION & ALERT MANAGEMENT SYSTEM
   Production-ready styling for comprehensive notification management
   ============================================================ */

/* Notification Priority Colors */
.notification-priority-critical {
    border-left: 4px solid #dc3545;
    background: linear-gradient(90deg, #fff5f5 0%, #ffffff 100%);
}

.notification-priority-high {
    border-left: 4px solid #fd7e14;
    background: linear-gradient(90deg, #fffbf0 0%, #ffffff 100%);
}

.notification-priority-normal {
    border-left: 4px solid #007bff;
    background: linear-gradient(90deg, #f0f7ff 0%, #ffffff 100%);
}

.notification-priority-low {
    border-left: 4px solid #6c757d;
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
}

/* Notification Categories */
.notification-category-job {
    --icon-bg: #e3f2fd;
    --icon-color: #1976d2;
}

.notification-category-application {
    --icon-bg: #f3e5f5;
    --icon-color: #7b1fa2;
}

.notification-category-system {
    --icon-bg: #fff3e0;
    --icon-color: #f57c00;
}

.notification-category-networking {
    --icon-bg: #e8f5e8;
    --icon-color: #388e3c;
}

/* Notification Item States */
.notification-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #dee2e6;
}

.notification-item.unread {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.02) 0%, rgba(0, 123, 255, 0.05) 100%);
    border-color: #b3d7ff;
}

.notification-item.read {
    opacity: 0.8;
}

.notification-item.archived {
    opacity: 0.6;
    background: #f8f9fa;
}

/* Notification Icon */
.notification-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Notification Content */
.notification-content-text {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-message {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.notification-meta {
    font-size: 12px;
    color: #adb5bd;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-timestamp {
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-timestamp::before {
    content: "🕒";
    font-size: 10px;
}

/* Notification Actions */
.notification-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.btn-notification-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-mark-read {
    background: #007bff;
    color: white;
}

.btn-mark-read:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-archive {
    background: #6c757d;
    color: white;
}

.btn-archive:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.btn-delete-notification {
    background: #dc3545;
    color: white;
}

.btn-delete-notification:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-view-details {
    background: #28a745;
    color: white;
}

.btn-view-details:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Notification Filters */
.notification-filters {
    background: #f8f9fa;
    padding: 16px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.filter-search {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

/* Notification Stats */
.notification-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Notification Settings */
.notification-settings-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.settings-category {
    margin-bottom: 24px;
}

.settings-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    flex: 1;
    font-size: 14px;
    color: #495057;
}

.settings-description {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.settings-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Enhanced Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: #dc3545;
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.toggle-switch.active {
    background: #28a745;
    border-color: #28a745;
}

.toggle-switch.disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* Notification Schedule */
.schedule-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.schedule-input {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.schedule-input label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.schedule-input input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

/* Bulk Actions */
.bulk-actions {
    background: #e9ecef;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bulk-actions-text {
    font-size: 14px;
    color: #495057;
    margin: 0;
}

.bulk-actions-buttons {
    display: flex;
    gap: 8px;
}

/* Empty State */
.notifications-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.notifications-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notifications-empty-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.notifications-empty-message {
    font-size: 14px;
    max-width: 300px;
    margin: 0 auto;
}

/* Loading State */
.notifications-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Modal */
.notification-modal-content {
    max-height: 70vh;
    overflow-y: auto;
}

.notification-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.notification-detail-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.notification-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.notification-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 16px;
}

.notification-detail-message {
    font-size: 16px;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 20px;
}

.notification-detail-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-search {
        width: 100%;
    }

    .notification-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .settings-control {
        align-self: flex-end;
    }

    .bulk-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .bulk-actions-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .notification-stats {
        grid-template-columns: 1fr;
    }

    .notification-item {
        flex-direction: column;
        text-align: center;
    }

    .notification-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }

    .notification-actions {
        justify-content: center;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .notification-title {
        color: #e2e8f0;
    }

    .notification-message {
        color: #a0aec0;
    }

    .notification-meta {
        color: #718096;
    }

    .notification-settings-section {
        background: #2d3748;
        border-color: #4a5568;
    }

    .settings-category-title {
        color: #e2e8f0;
    }

    .settings-label {
        color: #e2e8f0;
    }

    .settings-description {
        color: #a0aec0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .notification-item,
    .btn-notification-action,
    .toggle-switch {
        transition: none;
    }

    .fade-in,
    .slide-in {
        animation: none;
    }
}

/* Focus States */
.btn-notification-action:focus,
.toggle-switch:focus,
.filter-select:focus,
.filter-search:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .notification-item {
        border-width: 2px;
    }

    .toggle-switch {
        border-width: 3px;
    }

    .btn-notification-action {
        border: 2px solid currentColor;
    }
}