/* ================================================================
   NOTIFICATION SYSTEM STYLES
   ================================================================
   [L4] Styles for in-app notification system
   - RIGHT BOTTOM positioning
   - New notifications appear ABOVE old ones
   - Sleek, sharp, minimal design
   ================================================================ */

/* [L12] Notification Container - Fixed position at RIGHT BOTTOM */
/* [L13] Target both ID (#) and class (.) selectors for compatibility */
#notification-container,
.notification-container {
    position: fixed !important;
    bottom: 20px !important; /* [L17] Position at BOTTOM */
    right: 20px !important; /* [L18] Force RIGHT positioning */
    top: auto !important; /* [L19] Prevent top positioning */
    left: auto !important; /* [L20] Prevent left positioning */
    z-index: 99999 !important; /* [L21] Very high z-index to stay above ALL UI elements */
    display: flex !important;
    flex-direction: column !important; /* [L23] NEW notifications appear ABOVE old ones */
    gap: 6px !important; /* [L24] Tight gap between notifications */
    pointer-events: none !important; /* [L25] Allow clicks to pass through container */
    max-height: calc(100vh - 100px) !important; /* [L26] Prevent overflow beyond viewport */
    overflow: visible !important; /* [L27] Allow notifications to be visible */
    width: auto !important;
}

/* [L30] Individual Notification - SLEEK, SHARP, AUTO-EXPANDING design */
.notification {
    min-width: 380px; /* [L32] Base width for short messages */
    max-width: 760px; /* [L33] Double width for long messages */
    width: fit-content; /* [L34] Auto-expand based on content */
    min-height: 42px; /* [L35] Thin/slim height for short messages */
    max-height: none; /* [L36] Allow height to grow for very long messages */
    background: linear-gradient(135deg, var(--bg-secondary, #1F2937) 0%, rgba(31, 41, 55, 0.95) 100%);
    border-left: 3px solid var(--color-brand, #3B82F6); /* [L38] Thinner accent border */
    border-radius: 0 !important; /* [L39] SHARP EDGES - no rounded corners */
    padding: 10px 14px; /* [L40] Comfortable padding */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4),
                0 0 1px rgba(255, 255, 255, 0.1); /* [L42] Subtle shadow + edge highlight */
    display: flex;
    align-items: flex-start; /* [L44] Align to top for multi-line */
    gap: 10px;
    pointer-events: auto !important; /* [L46] CRITICAL: Allow clicks on notification */
    transform: translateX(110%); /* [L47] Start off-screen to the RIGHT */
    opacity: 0;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease-out,
                box-shadow 0.15s ease,
                width 0.2s ease; /* [L52] Smooth width transition */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer !important; /* [L54] Show pointer cursor for click-to-hold */
    user-select: none !important; /* [L55] Prevent text selection while holding */
    position: relative !important; /* [L56] Ensure proper stacking */
    backdrop-filter: blur(8px); /* [L57] Subtle blur effect for modern look */
    -webkit-backdrop-filter: blur(8px);
}

/* [L58] Show notification with animation - slides in from right */
.notification.notification-show {
    transform: translateX(0);
    opacity: 1;
}

/* [L64] Hide notification with animation - slides out to right */
.notification.notification-hide {
    transform: translateX(110%); /* [L67] Slide out to the RIGHT */
    opacity: 0;
}

/* [L71] Notification being held - visual feedback */
.notification.notification-held {
    transform: translateX(0) scale(0.98); /* [L73] Slight scale down when held */
    opacity: 0.85;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); /* [L75] Reduced shadow when held */
}

/* [L78] Hover effect for sleek interaction */
.notification:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5),
                0 0 1px rgba(255, 255, 255, 0.15);
}

/* [L85] Success notification - Green accent */
.notification-success {
    border-left-color: #10B981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-secondary, #1F2937) 100%);
}

.notification-success .notification-icon {
    color: #10B981;
}

/* [L94] Error notification - Red accent */
.notification-error {
    border-left-color: #EF4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-secondary, #1F2937) 100%);
}

.notification-error .notification-icon {
    color: #EF4444;
}

/* [L103] Warning notification - Amber accent */
.notification-warning {
    border-left-color: #F59E0B;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-secondary, #1F2937) 100%);
}

.notification-warning .notification-icon {
    color: #F59E0B;
}

/* [L112] Info notification - Blue accent */
.notification-info {
    border-left-color: #3B82F6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, var(--bg-secondary, #1F2937) 100%);
}

.notification-info .notification-icon {
    color: #3B82F6;
}

/* [L115] Notification icon container - compact, top-aligned */
.notification-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px; /* [L121] Fixed small width */
    height: 18px; /* [L122] Fixed small height */
    margin-top: 2px; /* [L123] Align with first line of text */
}

.notification-icon svg {
    width: 16px !important; /* [L127] Smaller icon */
    height: 16px !important;
}

/* [L130] Notification message text - auto-expanding */
.notification-message {
    flex: 1;
    color: var(--text-primary, #F9FAFB);
    font-size: 12px; /* [L134] Smaller font for sleek look */
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.01em; /* [L137] Tighter letter spacing */
    word-wrap: break-word; /* [L138] Wrap long words */
    overflow-wrap: break-word; /* [L139] Break long strings */
    white-space: normal; /* [L140] Allow text to wrap to multiple lines */
    max-width: 100%; /* [L141] Don't overflow container */
}

/* [L116] Close button - HIDDEN (using click-to-hold instead) */
.notification-close {
    display: none !important; /* [L118] Hide the close button completely */
}

/* [L170] Responsive adjustments for smaller screens */
@media (max-width: 640px) {
    #notification-container,
    .notification-container {
        bottom: 10px !important; /* [L174] Keep at BOTTOM on mobile */
        right: 10px !important; /* [L175] Keep on RIGHT side on mobile */
        left: 10px !important; /* [L176] Full width on mobile */
        top: auto !important;
    }

    .notification {
        min-width: auto !important; /* [L181] No min-width on mobile */
        max-width: 100% !important; /* [L182] Full width on mobile */
        width: auto !important;
        border-radius: 0 !important; /* [L184] Keep sharp edges on mobile */
    }
}

/* [L172] Theme-specific overrides for Bloomberg theme */
[data-theme="bloomberg"] .notification {
    background: linear-gradient(135deg, #0A0A0A 0%, #111111 100%);
    border-left-width: 2px;
    border-radius: 0 !important; /* [L176] Sharp edges for Bloomberg */
    box-shadow: 0 2px 12px rgba(255, 140, 0, 0.15),
                inset 0 1px 0 rgba(255, 140, 0, 0.1); /* [L178] Amber glow */
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
    font-size: 11px;
}

[data-theme="bloomberg"] .notification-success {
    border-left-color: #00FF00;
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.3);
}

[data-theme="bloomberg"] .notification-success .notification-icon {
    color: #00FF00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

[data-theme="bloomberg"] .notification-error {
    border-left-color: #FF3333;
    box-shadow: 0 0 12px rgba(255, 51, 51, 0.3);
}

[data-theme="bloomberg"] .notification-error .notification-icon {
    color: #FF3333;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.3);
}

[data-theme="bloomberg"] .notification-warning {
    border-left-color: #FFD700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

[data-theme="bloomberg"] .notification-warning .notification-icon {
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

[data-theme="bloomberg"] .notification-info {
    border-left-color: #00BFFF;
    box-shadow: 0 0 12px rgba(0, 191, 255, 0.3);
}

[data-theme="bloomberg"] .notification-info .notification-icon {
    color: #00BFFF;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.3);
}

[data-theme="bloomberg"] .notification-message {
    color: #FFFFFF;
    font-size: 11px;
}

/* [L230] Theme-specific overrides for HFT theme */
[data-theme="hft"] .notification {
    background: linear-gradient(135deg, #0D1F3C 0%, #132D50 100%);
    border-left-width: 2px;
    border-radius: 0 !important; /* [L234] Sharp edges for HFT */
    box-shadow: 0 2px 16px rgba(0, 212, 255, 0.2),
                inset 0 1px 0 rgba(0, 212, 255, 0.1); /* [L236] Cyan glow */
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
    font-size: 11px;
}

[data-theme="hft"] .notification-success {
    border-left-color: #00FF88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

[data-theme="hft"] .notification-success .notification-icon {
    color: #00FF88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

[data-theme="hft"] .notification-error {
    border-left-color: #FF4D6A;
    box-shadow: 0 0 15px rgba(255, 77, 106, 0.4);
}

[data-theme="hft"] .notification-error .notification-icon {
    color: #FF4D6A;
    text-shadow: 0 0 8px rgba(255, 77, 106, 0.5);
}

[data-theme="hft"] .notification-warning {
    border-left-color: #FFD93D;
    box-shadow: 0 0 15px rgba(255, 217, 61, 0.4);
}

[data-theme="hft"] .notification-warning .notification-icon {
    color: #FFD93D;
    text-shadow: 0 0 8px rgba(255, 217, 61, 0.4);
}

[data-theme="hft"] .notification-info {
    border-left-color: #00D4FF;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

[data-theme="hft"] .notification-info .notification-icon {
    color: #00D4FF;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

[data-theme="hft"] .notification-message {
    color: #00D4FF;
    font-size: 11px;
}
