/**
 * FORDIPS TECH - NOTIFICATIONS STYLES
 * Notification bell and dropdown styling
 */

/* ============================================
   NOTIFICATION SYSTEM CONTAINER
   ============================================ */
.notification-system {
    position: relative;
    display: inline-block;
}

/* ============================================
   NOTIFICATION BELL
   ============================================ */
.notification-bell {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    background: rgba(0, 0, 0, 0.05);
}

.notification-bell svg {
    color: #374151;
}

.notification-bell.has-notifications {
    animation: bellRing 2s ease-in-out infinite;
}

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

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 0 5px;
    border: 2px solid white;
    animation: badgePulse 2s infinite;
}

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

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.notification-dropdown.active {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   NOTIFICATION HEADER
   ============================================ */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.mark-all-read-btn {
    background: transparent;
    border: none;
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.mark-all-read-btn:hover {
    background: #eff6ff;
}

/* ============================================
   NOTIFICATION LIST
   ============================================ */
.notification-list {
    max-height: 450px;
    overflow-y: auto;
}

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

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

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

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   NOTIFICATION ITEM
   ============================================ */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

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

.notification-item.unread {
    background: #eff6ff;
}

.notification-item.unread:hover {
    background: #dbeafe;
}

.notification-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon.order {
    background: #dbeafe;
    color: #2563eb;
}

.notification-icon.payment {
    background: #d1fae5;
    color: #059669;
}

.notification-icon.help_me_pay {
    background: #fef3c7;
    color: #d97706;
}

.notification-icon.shipping {
    background: #e0e7ff;
    color: #4f46e5;
}

.notification-icon.account {
    background: #f3e8ff;
    color: #7c3aed;
}

.notification-icon.promo {
    background: #fce7f3;
    color: #db2777;
}

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

.notification-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.notification-content p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.notification-unread-dot {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: 50%;
}

/* ============================================
   NOTIFICATION FOOTER
   ============================================ */
.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
}

.view-all-notifications-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: #2563eb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.view-all-notifications-btn:hover {
    background: #eff6ff;
}

/* ============================================
   NOTIFICATION EMPTY STATE
   ============================================ */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.notification-empty svg {
    color: #cbd5e1;
    margin-bottom: 15px;
}

.notification-empty p {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

.notification-empty small {
    font-size: 13px;
    color: #9ca3af;
}

/* ============================================
   NOTIFICATION OVERLAY
   ============================================ */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.3s ease;
    z-index: 999;
}

.notification-overlay.active {
    background: rgba(0, 0, 0, 0.3);
    pointer-events: all;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        max-width: 400px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 90px);
    }

    .notification-item {
        padding: 14px 16px;
    }

    .notification-header {
        padding: 14px 16px;
    }

    .notification-footer {
        padding: 10px 16px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.notification-bell:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.notification-item:focus {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .notification-dropdown {
        border: 2px solid #000;
    }

    .notification-item {
        border: 1px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .notification-bell.has-notifications,
    .notification-badge {
        animation: none !important;
    }

    .notification-dropdown {
        transition: opacity 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification-bell svg {
        color: #f9fafb;
    }

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

    .notification-dropdown {
        background: #1f2937;
    }

    .notification-header {
        border-bottom-color: #374151;
    }

    .notification-header h3 {
        color: #f9fafb;
    }

    .notification-item {
        border-bottom-color: #374151;
    }

    .notification-item:hover {
        background: #374151;
    }

    .notification-item.unread {
        background: #1e3a8a;
    }

    .notification-item.unread:hover {
        background: #1e40af;
    }

    .notification-content h4 {
        color: #f9fafb;
    }

    .notification-content p {
        color: #d1d5db;
    }

    .notification-footer {
        border-top-color: #374151;
    }
}
