/* Modern Session Messages - Eye-catching and Stylish */

/* Container for session messages */
.session-messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

/* Base session message styles */
.session-message {
    position: relative;
    margin-bottom: 15px;
    padding: 20px 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
    color: white;
    overflow: hidden;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

/* Animation for showing messages */
.session-message.show {
    transform: translateX(0);
    opacity: 1;
}

/* Animation for hiding messages */
.session-message.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Success message styling */
.session-message.success {
    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
    border-left: 4px solid #34D399;
}

.session-message.success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(52, 211, 153, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    pointer-events: none;
}

/* Error message styling */
.session-message.error {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #B91C1C 100%);
    border-left: 4px solid #F87171;
}

.session-message.error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(248, 113, 113, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    pointer-events: none;
}

/* Warning message styling */
.session-message.warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 50%, #B45309 100%);
    border-left: 4px solid #FBBF24;
}

.session-message.warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    pointer-events: none;
}

/* Info message styling */
.session-message.info {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
    border-left: 4px solid #60A5FA;
}

.session-message.info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(96, 165, 250, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    pointer-events: none;
}

/* Message content */
.session-message-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Message icon */
.session-message-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-top: 2px;
}

.session-message.success .session-message-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #34D399;
}

.session-message.error .session-message-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #F87171;
}

.session-message.warning .session-message-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #FBBF24;
}

.session-message.info .session-message-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #60A5FA;
}

/* Message text */
.session-message-text {
    flex: 1;
    font-weight: 500;
}

/* Close button */
.session-message-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
    z-index: 3;
}

.session-message-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Progress bar for auto-dismiss */
.session-message-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 16px 16px;
    transition: width linear;
}

.session-message.success .session-message-progress {
    background: rgba(52, 211, 153, 0.6);
}

.session-message.error .session-message-progress {
    background: rgba(248, 113, 113, 0.6);
}

.session-message.warning .session-message-progress {
    background: rgba(251, 191, 36, 0.6);
}

.session-message.info .session-message-progress {
    background: rgba(96, 165, 250, 0.6);
}

/* Hover effects */
.session-message:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .session-messages-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .session-message {
        padding: 16px 20px;
        font-size: 13px;
    }
    
    .session-message:hover {
        transform: translateX(0) scale(1.01);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .session-message {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
}

/* Animation keyframes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

/* Special pulse animation for important messages */
.session-message.important {
    animation: pulse 2s infinite;
}

/* Glassmorphism effect for modern look */
.session-message.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Neon glow effect for attention-grabbing messages */
.session-message.neon {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.8);
    }
}