/* ========================================
   MESSAGES STYLES - Modern SaaS Design
======================================== */

/* Messages Container */
.messages-container {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1050;
}

/* Message Alert Base */
.message-alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
    animation: slideInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.message-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

/* Message Alert Variants */
.message-alert.alert-success {
    background: rgba(5, 150, 105, 0.1);
    color: #065f46;
    border-left-color: #059669;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.message-alert.alert-danger,
.message-alert.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left-color: #dc2626;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.message-alert.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-left-color: #f59e0b;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.message-alert.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-left-color: #3b82f6;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Message Icon */
.message-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
    font-size: 1.125rem;
    position: relative;
    z-index: 1;
}

/* Message Content */
.message-content {
    flex: 1;
    font-weight: 500;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 1;
}

/* Close Button */
.message-alert .btn-close {
    margin-left: 1rem;
    padding: 0.5rem;
    opacity: 0.6;
    transition: all 0.2s ease;
    background: none;
    border: none;
    position: relative;
    z-index: 1;
    border-radius: 0.375rem;
}

.message-alert .btn-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.message-alert .btn-close:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

/* Auto-dismiss animation */
.message-alert.dismissing {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Hover Effects */
.message-alert:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Responsive Design */
@media (max-width: 768px) {
    .messages-container {
        margin-left: -1rem;
        margin-right: -1rem;
        margin-bottom: 1.5rem;
    }
    
    .message-alert {
        border-radius: 0;
        border-left: none;
        border-top: 4px solid;
        margin-bottom: 0.5rem;
    }
    
    .message-alert.alert-success {
        border-top-color: #059669;
    }
    
    .message-alert.alert-danger,
    .message-alert.alert-error {
        border-top-color: #dc2626;
    }
    
    .message-alert.alert-warning {
        border-top-color: #f59e0b;
    }
    
    .message-alert.alert-info {
        border-top-color: #3b82f6;
    }
}

/* Multiple Messages Stacking */
.message-alert + .message-alert {
    margin-top: 0.75rem;
}

/* Success Message Special Styling */
.message-alert.alert-success .message-icon {
    color: #059669;
}

.message-alert.alert-danger .message-icon,
.message-alert.alert-error .message-icon {
    color: #dc2626;
}

.message-alert.alert-warning .message-icon {
    color: #f59e0b;
}

.message-alert.alert-info .message-icon {
    color: #3b82f6;
}
