/**
 * Task Manager Pro - Notification Bell Styles
 * Add this to your frontend CSS files
 */

/* Notification Bell Container */
.tm-notification-bell {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Bell Button */
.tm-bell-button {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.tm-bell-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.tm-bell-button:active {
    transform: translateY(0);
}

.tm-bell-button i {
    animation: bellRing 2s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

/* Notification Badge */
.tm-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid white;
    animation: badgePulse 2s ease-in-out infinite;
}

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

/* Notification Dropdown */
.tm-notification-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    animation: dropdownSlide 0.3s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification Header */
.tm-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tm-notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.tm-mark-all-read {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tm-mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Notification List */
.tm-notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.tm-notification-list::-webkit-scrollbar {
    width: 6px;
}

.tm-notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.tm-notification-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.tm-notification-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Notification Item */
.tm-notification-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.tm-notification-item:hover {
    background: #f9fafb;
}

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

.tm-notification-unread {
    background: #f0f9ff;
}

.tm-notification-unread:hover {
    background: #e0f2fe;
}

/* Notification Icon */
.tm-notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.tm-notification-icon.task_due_soon {
    background: #fef3c7;
    color: #f59e0b;
}

.tm-notification-icon.task_completed,
.tm-notification-icon.task_completed_by_user {
    background: #d1fae5;
    color: #10b981;
}

.tm-notification-icon.subtask_completed {
    background: #dbeafe;
    color: #3b82f6;
}

.tm-notification-icon.test {
    background: #e0e7ff;
    color: #6366f1;
}

/* Notification Content */
.tm-notification-content {
    flex: 1;
}

.tm-notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 4px;
}

.tm-notification-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 4px;
}

.tm-notification-time {
    font-size: 11px;
    color: #9ca3af;
}

/* Unread Dot */
.tm-notification-unread-dot {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

/* Empty State */
.tm-notification-empty {
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
}

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

.tm-notification-empty p {
    margin: 8px 0 0 0;
    font-size: 14px;
}

/* Loading State */
.tm-notification-loading {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

.tm-notification-loading i {
    margin-right: 8px;
}

/* Notification Footer */
.tm-notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.tm-view-all-notifications {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.tm-view-all-notifications:hover {
    color: #764ba2;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .tm-notification-bell {
        top: 10px;
        right: 10px;
    }
    
    .tm-notification-dropdown {
        width: calc(100vw - 20px);
        right: -15px;
    }
    
    .tm-bell-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* Integration with existing portals */
.task-manager-portal .tm-notification-bell {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Settings Panel Styles (for notification preferences) */
.tm-notification-settings {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tm-notification-settings h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #111827;
}

.tm-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.tm-setting-row:last-child {
    border-bottom: none;
}

.tm-setting-label {
    flex: 1;
}

.tm-setting-label h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.tm-setting-label p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.tm-setting-control {
    margin-left: 20px;
}

/* Toggle Switch */
.tm-toggle {
    position: relative;
    width: 48px;
    height: 24px;
}

.tm-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.tm-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.tm-toggle input:checked + .tm-toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tm-toggle input:checked + .tm-toggle-slider:before {
    transform: translateX(24px);
}

/* Select Dropdown */
.tm-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: white;
    cursor: pointer;
}

.tm-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Number Input */
.tm-number-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    text-align: center;
}

.tm-number-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Test Button */
.tm-test-notification-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tm-test-notification-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
