/**
 * Notification System Styles
 * Courier Pigeon Notification System for Immortal Nexus
 * Version: 1.0
 */

/* ========================================
   NOTIFICATION ICON (HEADER)
   ======================================== */

.notification-icon-container {
    display: inline-flex;
    align-items: center;
    margin: 0 0.5rem;
}

.notification-icon {
    position: relative;
    background: transparent;
    border: 2px solid rgba(255, 94, 120, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary, #f0e6ff);
}

.notification-icon:hover {
    border-color: #ff5e78;
    background: rgba(255, 94, 120, 0.1);
    transform: scale(1.05);
}

.notification-icon:active {
    transform: scale(0.95);
}

.pigeon-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff5e78, #ff3d5c);
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(255, 94, 120, 0.5);
    animation: pulse-badge 2s infinite;
}

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

/* ========================================
   NOTIFICATION DROPDOWN (DESKTOP)
   ======================================== */

.notification-dropdown {
    position: fixed;
    width: 400px;
    max-height: 600px;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    border: 2px solid rgba(255, 94, 120, 0.4);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.open {
    opacity: 1;
    transform: translateY(0);
}

.notification-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 94, 120, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 94, 120, 0.05);
}

.notification-dropdown-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #f0e6ff;
    font-weight: 600;
}

.notification-mark-all-read-small {
    background: transparent;
    border: 1px solid rgba(255, 94, 120, 0.3);
    color: #ff5e78;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-mark-all-read-small:hover {
    background: rgba(255, 94, 120, 0.1);
    border-color: #ff5e78;
}

.notification-list {
    overflow-y: auto;
    max-height: 500px;
    flex: 1;
}

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

.notification-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(255, 94, 120, 0.3);
    border-radius: 4px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 94, 120, 0.5);
}

/* ========================================
   NOTIFICATION ITEMS
   ======================================== */

.notification-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 94, 120, 0.1);
    transition: background 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(255, 94, 120, 0.05);
}

.notification-item.unread {
    background: rgba(255, 94, 120, 0.08);
    border-left: 3px solid #ff5e78;
}

.notification-item-content {
    flex: 1;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.notification-type-icon {
    color: #ff5e78;
    font-size: 0.9rem;
}

.notification-time {
    font-size: 0.75rem;
    color: rgba(240, 230, 255, 0.6);
}

.notification-item-title {
    font-weight: 600;
    color: #f0e6ff;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.notification-item-message {
    font-size: 0.85rem;
    color: rgba(240, 230, 255, 0.8);
    line-height: 1.4;
}

.notification-mark-read {
    background: transparent;
    border: none;
    color: rgba(255, 94, 120, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.notification-mark-read:hover {
    color: #ff5e78;
}

.notification-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(240, 230, 255, 0.6);
}

.notification-empty .pigeon-icon-large {
    width: 80px;
    height: 80px;
    stroke: rgba(255, 94, 120, 0.3);
    margin: 0 auto 1rem;
}

.notification-empty p {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
    color: #f0e6ff;
}

.notification-empty small {
    font-size: 0.85rem;
    color: rgba(240, 230, 255, 0.5);
}

.notification-loading {
    text-align: center;
    padding: 2rem;
    color: rgba(240, 230, 255, 0.6);
}

.notification-loading i {
    margin-right: 0.5rem;
}

/* ========================================
   NOTIFICATION MODAL (MOBILE)
   ======================================== */

.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-modal.open {
    opacity: 1;
}

.notification-modal-content {
    background: linear-gradient(to bottom, #1a1a2e, #0d0d1a);
    width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notification-modal.open .notification-modal-content {
    transform: translateY(0);
}

.notification-modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid rgba(255, 94, 120, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 94, 120, 0.05);
}

.notification-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #f0e6ff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-modal-header .pigeon-icon {
    width: 24px;
    height: 24px;
}

.notification-modal-close {
    background: transparent;
    border: 2px solid rgba(255, 94, 120, 0.3);
    color: #ff5e78;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notification-modal-close:hover {
    background: rgba(255, 94, 120, 0.1);
    border-color: #ff5e78;
}

.notification-modal-actions {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 94, 120, 0.2);
}

.notification-mark-all-read {
    background: linear-gradient(135deg, rgba(255, 94, 120, 0.2), rgba(255, 94, 120, 0.1));
    border: 1px solid rgba(255, 94, 120, 0.4);
    color: #f0e6ff;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.notification-mark-all-read:hover {
    background: linear-gradient(135deg, rgba(255, 94, 120, 0.3), rgba(255, 94, 120, 0.2));
    border-color: #ff5e78;
}

.notification-modal-body {
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 200px);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.nexus-notification-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.nexus-notification-toast {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255, 94, 120, 0.4);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    gap: 1rem;
    cursor: pointer;
    animation: slide-in-right 0.3s ease;
    transition: all 0.2s ease;
}

.nexus-notification-toast:hover {
    border-color: #ff5e78;
    transform: translateX(-5px);
}

.nexus-notification-toast.toast-hiding {
    animation: slide-out-right 0.3s ease;
    opacity: 0;
}

@keyframes slide-in-right {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out-right {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-icon {
    flex-shrink: 0;
}

.toast-icon svg {
    width: 40px;
    height: 40px;
    stroke: #ff5e78;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #f0e6ff;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.toast-message {
    font-size: 0.85rem;
    color: rgba(240, 230, 255, 0.8);
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 94, 120, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #ff5e78;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        max-width: 400px;
        right: 10px !important;
    }

    .nexus-notification-toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .nexus-notification-toast {
        width: 100%;
    }

    @keyframes slide-in-right {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes slide-out-right {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}

@media (max-width: 480px) {
    .notification-icon {
        width: 36px;
        height: 36px;
    }

    .pigeon-icon {
        width: 18px;
        height: 18px;
    }

    .notification-badge {
        font-size: 9px;
        min-width: 16px;
        height: 16px;
    }
}

/* ========================================
   LIGHT THEME SUPPORT
   ======================================== */

body.light-theme .notification-icon {
    border-color: rgba(26, 27, 78, 0.3);
    color: #1a1b4e;
}

body.light-theme .notification-icon:hover {
    border-color: #1a1b4e;
    background: rgba(26, 27, 78, 0.1);
}

body.light-theme .notification-dropdown {
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    border-color: rgba(26, 27, 78, 0.2);
}

body.light-theme .notification-dropdown-header {
    background: rgba(26, 27, 78, 0.05);
    border-bottom-color: rgba(26, 27, 78, 0.2);
}

body.light-theme .notification-dropdown-header h3 {
    color: #1a1b4e;
}

body.light-theme .notification-mark-all-read-small {
    color: #1a1b4e;
    border-color: rgba(26, 27, 78, 0.3);
}

body.light-theme .notification-mark-all-read-small:hover {
    background: rgba(26, 27, 78, 0.1);
    border-color: #1a1b4e;
}

body.light-theme .notification-item {
    border-bottom-color: rgba(26, 27, 78, 0.1);
}

body.light-theme .notification-item:hover {
    background: rgba(26, 27, 78, 0.05);
}

body.light-theme .notification-item.unread {
    background: rgba(255, 94, 120, 0.1);
    border-left-color: #ff5e78;
}

body.light-theme .notification-item-title {
    color: #1a1b4e;
}

body.light-theme .notification-item-message {
    color: rgba(26, 27, 78, 0.8);
}

body.light-theme .notification-time {
    color: rgba(26, 27, 78, 0.5);
}

body.light-theme .notification-modal-content {
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
}

body.light-theme .notification-modal-header {
    background: rgba(26, 27, 78, 0.05);
    border-bottom-color: rgba(26, 27, 78, 0.2);
}

body.light-theme .notification-modal-header h2 {
    color: #1a1b4e;
}

body.light-theme .nexus-notification-toast {
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
    border-color: rgba(26, 27, 78, 0.3);
}

body.light-theme .toast-title {
    color: #1a1b4e;
}

body.light-theme .toast-message {
    color: rgba(26, 27, 78, 0.8);
}

body.light-theme .notification-empty p {
    color: #1a1b4e;
}

body.light-theme .notification-empty small {
    color: rgba(26, 27, 78, 0.5);
}
