/* FLOATING NOTIFICATIONS - Based on mobile-notification.css */
.floating-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(203, 50, 136, 0.15);
    z-index: 10000;
    cursor: pointer;
    max-width: calc(100vw - 40px);
    min-width: 340px;
    border: 1px solid #CB3288;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    user-select: none;
    margin-bottom: 12px;
    overflow: visible;
    opacity: 1 !important;
    transform: translateX(100%);
    transition: all 0.3s ease-out;
}

.floating-notification:hover {
    transform: translateX(0) translateY(-3px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(203, 50, 136, 0.3);
    border-color: rgba(203, 50, 136, 0.4);
    transition: all 0.2s ease-out;
}

.floating-notification.show {
    transform: translateX(0);
}

/* Mobile-specific styles - top-to-center animation */
@media (max-width: 768px) {
    .floating-notification {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    
    .floating-notification:hover {
        transform: translateX(-50%) translateY(-3px);
    }
    
    .floating-notification.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Stack multiple notifications vertically - handled by JavaScript */

.notification-content {
    position: relative;
    padding: 16px 50px 16px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 60px;
}

.notification-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.notification-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.new-message-text {
    font-size: 8px;
    font-weight: 600;
    color: #CB3288;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.notification-message {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.sender-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.message-preview {
    font-size: 13px;
    color: #b3b3b8;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    flex: 1;
    min-width: 0;
    margin-bottom: 6px;
    font-weight: 400;
}

.timestamp {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 500;
    flex-shrink: 0;
    align-self: flex-end;
    letter-spacing: 0.01em;
}

.message-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #CB3288 0%, #E91E63 100%);
    color: white;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(203, 50, 136, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-button-container {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.notification-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(203, 50, 136, 0.2);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #CB3288;
    width: 0%;
    transition: none;
    border-radius: 0 0 8px 8px;
    animation: progressBarShrink 6s linear forwards;
}

@keyframes progressBarShrink {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

.close-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #CB3288;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
    line-height: 1;
    flex-shrink: 0;
    outline: none;
}

.close-btn:hover {
    background: rgba(203, 50, 136, 0.15);
    border-color: rgba(203, 50, 136, 0.3);
    color: #CB3288;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(203, 50, 136, 0.2);
}

.close-btn:active {
    transform: scale(0.95);
}

/* Animation keyframes - faster and smoother */
@keyframes floatingNotificationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%) translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

/* Notification container for better list management */
.floating-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.floating-notifications-container .floating-notification {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    margin-bottom: 12px;
    pointer-events: auto;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .floating-notifications-container {
        top: 15px;
        right: 15px;
        left: 15px;
    }
    
    .floating-notification {
        min-width: 300px;
        max-width: calc(100vw - 30px);
        border-radius: 8px;
    }
    
    .notification-content {
        padding: 16px;
        gap: 12px;
        min-height: 56px;
    }
    
    .sender-name {
        font-size: 16px;
    }
    
    .message-preview {
        font-size: 14px;
    }
    
    .close-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .message-count {
        top: 10px;
        right: 10px;
        min-width: 18px;
        height: 18px;
        font-size: 8px;
    }
}

/* Ensure notifications are above all other content */
.floating-notification {
    z-index: 10000 !important;
}

/* Prevent interference with page content */
.floating-notification * {
    box-sizing: border-box;
}

/* Accessibility improvements */
.floating-notification:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.close-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 1px;
}