/* Talaa2 Notification System Styles - Modern Design */

/* Use existing notification elements */
.notification-bell {
    position: relative;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-bell svg {
    width: 22px;
    height: 22px;
    color: #9ca3af;
    transition: color 0.2s;
}

.notification-bell:hover svg {
    color: #f3f4f6;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 0 4px;
    border: 2px solid #1f2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    width: 380px;
    max-height: 500px;
    z-index: 10000;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    display: none;
    overflow: hidden;
}

.notification-dropdown.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    display: block !important;
}

.notification-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #1f2937;
    border-left: 1px solid #374151;
    border-top: 1px solid #374151;
    transform: rotate(45deg);
    z-index: 1;
}

.notification-dropdown-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #374151;
    background: #1f2937;
    position: relative;
    z-index: 2;
}

.notification-dropdown-header h3 {
    color: #f9fafb;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    margin-bottom: 8px;
}

.notification-dropdown-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.notification-dropdown-clear {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.notification-dropdown-clear:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.notification-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9ca3af;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #10b981;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.off {
    background: #374151;
}

.toggle-switch.off::before {
    transform: translateX(-20px);
}

.notification-dropdown-list {
    max-height: 400px;
    overflow-y: auto;
    background: #1f2937;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #374151;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

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

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

.notification-item.unread {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, #1f2937 30%);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3b82f6;
}

/* Read notifications appear calmer/neutral */
.notification-item.read {
    background: #1f2937;
    opacity: 0.8;
}

.notification-item.read .notification-title {
    color: #d1d5db;
    font-weight: 500;
}

.notification-item.read .notification-message {
    color: #9ca3af;
}

.notification-item.read:hover {
    background-color: #1f2937;
    transform: none;
}

.notification-item.read .notification-avatar {
    filter: grayscale(0.6);
    opacity: 0.85;
}

.notification-item.read .notification-time {
    color: #9ca3af;
}

.notification-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

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

.notification-title {
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 4px;
    line-height: 1.4;
    font-size: 14px;
}

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

.notification-time {
    color: #6b7280;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 8px;
}

.notification-mark-read-btn {
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    transition: all 0.2s;
    opacity: 0;
    transform: translateX(8px);
}

.notification-item:hover .notification-mark-read-btn {
    opacity: 1;
    transform: translateX(0);
}

.notification-mark-read-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.notification-mark-read-btn:active {
    transform: scale(0.95);
}

.notification-read-indicator {
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    opacity: 0.7;
}

.notification-badge-time {
    background: #dc2626;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.notification-dropdown-empty {
    padding: 60px 20px;
    text-align: center;
    color: #6b7280;
}

.notification-dropdown-empty svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #4b5563;
}

.notification-dropdown-empty h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #9ca3af;
}

.notification-dropdown-empty p {
    font-size: 14px;
    color: #6b7280;
}

/* Scrollbar customization */
.notification-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.notification-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}

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

.notification-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Toast notifications */
.toast-notification {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 16px;
    margin-bottom: 12px;
    max-width: 400px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateX(400px);
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

.toast-notification.removing {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-notification:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.toast-notification .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-notification .close-btn:hover {
    color: #f9fafb;
    background: rgba(255, 255, 255, 0.1);
}

.toast-title {
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 6px;
    padding-right: 30px;
    font-size: 14px;
}

.toast-message {
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 340px;
        right: -20px;
    }
    
    .toast-notification {
        max-width: calc(100vw - 32px);
        margin: 0 16px 12px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 300px;
        right: -30px;
    }
    
    .notification-item {
        padding: 12px 16px;
    }
    
    .notification-dropdown-header {
        padding: 16px;
    }
}
