/**
 * Bildirim Sistemi Stilleri
 * Bell icon, badge, dropdown, notification items
 */

/* === Notification Wrapper === */
.notification-wrapper {
    position: relative;
    display: inline-block;
}

/* === Bell Icon === */
#notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
}

#notification-bell:hover {
    background: #f7fafc;
    color: #667eea;
}

#notification-bell svg {
    width: 22px;
    height: 22px;
}

/* Dark Mode - Bell Icon */
body.dark-mode #notification-bell {
    color: #e9ecef;
}

body.dark-mode #notification-bell:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #667eea;
}

/* === Notification Badge === */
#notification-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: bounce 0.6s ease;
    z-index: 10;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* === Notification Dropdown === */
#notification-dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dark Mode - Notification Dropdown */
body.dark-mode #notification-dropdown {
    background: #2d3238;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === Notification Header === */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #e2e8f0;
    background: #f7fafc;
}

.notification-header h3 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.notification-header .count {
    color: #667eea;
    font-weight: 600;
}

.mark-all-read-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark-all-read-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* === Notification List === */
.notification-list {
    overflow-y: auto;
    max-height: 360px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f7fafc;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* === Notification Item === */
.notification-item {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f7fafc;
}

.notification-item:hover {
    background: #f7fafc;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: #f0f4ff;
}

.notification-item.unread:hover {
    background: #e6edff;
}

/* === Notification Icon === */
.notification-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.notification-icon.order {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-icon.payment {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.notification-icon.system {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
}

.notification-icon.message {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

/* === Notification Content === */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.375rem 0;
    line-height: 1.4;
}

.notification-message {
    color: #718096;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    color: #a0aec0;
    font-size: 0.8rem;
}

/* === Unread Dot === */
.unread-dot {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* === Delete Button === */
.notification-delete {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #a0aec0;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.notification-item:hover .notification-delete {
    opacity: 1;
}

.notification-delete:hover {
    background: #fee;
    color: #e53e3e;
}

/* === Empty State === */
.notification-empty {
    text-align: center;
    padding: 3rem 2rem;
}

.notification-empty svg {
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.notification-empty p {
    color: #718096;
    font-size: 0.95rem;
    margin: 0;
}

/* === Notification Footer === */
.notification-footer {
    padding: 0.875rem 1.25rem;
    border-top: 2px solid #e2e8f0;
    background: #f7fafc;
}

.view-all-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #5568d3;
    gap: 0.75rem;
}

/* === Toast Notifications === */
.notification-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 320px;
}

.notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast-success {
    border-left: 4px solid #48bb78;
    color: #276749;
}

.notification-toast-error {
    border-left: 4px solid #e53e3e;
    color: #742a2a;
}

.notification-toast-info {
    border-left: 4px solid #4299e1;
    color: #2c5282;
}

/* === Animations === */
@keyframes fadeOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* === Responsive Design === */
@media (max-width: 768px) {
    #notification-dropdown {
        width: 320px;
        max-height: 450px;
    }
    
    .notification-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .mark-all-read-btn {
        width: 100%;
        justify-content: center;
    }
    
    .notification-item {
        padding: 0.875rem 1rem;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
    }
    
    .notification-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .notification-toast {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    #notification-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        transform: translateY(100%);
    }
    
    #notification-dropdown.show {
        transform: translateY(0);
    }
}

/* === Dark Mode Support === */
@media (prefers-color-scheme: dark) {
    #notification-bell {
        color: #cbd5e0;
    }
    
    #notification-bell:hover {
        background: #2d3748;
        color: #667eea;
    }
    
    #notification-dropdown {
        background: #2d3748;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    
    .notification-header {
        background: #1a202c;
        border-bottom-color: #4a5568;
    }
    
    .notification-header h3 {
        color: #f7fafc;
    }
    
    .notification-list::-webkit-scrollbar-track {
        background: #1a202c;
    }
    
    .notification-item {
        border-bottom-color: #1a202c;
    }
    
    .notification-item:hover {
        background: #1a202c;
    }
    
    .notification-item.unread {
        background: #2d3748;
    }
    
    .notification-item.unread:hover {
        background: #374151;
    }
    
    .notification-title {
        color: #f7fafc;
    }
    
    .notification-message {
        color: #a0aec0;
    }
    
    .notification-time {
        color: #718096;
    }
    
    .notification-empty svg {
        color: #4a5568;
    }
    
    .notification-empty p {
        color: #a0aec0;
    }
    
    .notification-footer {
        background: #1a202c;
        border-top-color: #4a5568;
    }
    
    .notification-toast {
        background: #2d3748;
        color: #f7fafc;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    }
    
    .notification-toast-success {
        border-left-color: #48bb78;
        color: #9ae6b4;
    }
    
    .notification-toast-error {
        border-left-color: #e53e3e;
        color: #fc8181;
    }
    
    .notification-toast-info {
        border-left-color: #4299e1;
        color: #90cdf4;
    }
}
