/* Modern UI/UX Styles for MessageBox UserControl */
@keyframes msgSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .custom-msg-box {
        animation: none !important;
    }
}

.custom-msg-box {
    display: block;
    margin: 12px 0 20px 0;
    padding: 14px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    animation: msgSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
    position: relative;
    overflow: visible; /* was 'hidden' — clipped the box-shadow */
}

.msg-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.msg-left-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.msg-icon-box {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.msg-text-box {
    font-size: 0.935rem;
    font-weight: 500;
    line-height: 1.45;
    word-break: break-word;
}

.msg-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-decoration: none !important;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
    opacity: 0.75;
}

.msg-close-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.08);
    transform: scale(1.08);
}

.msg-close-btn:focus-visible {
    opacity: 1;
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Success Alert Styling */
.msg-box-success {
    background-color: #f0fdf4;
    border-left: 5px solid #10b981;
    border-top: 1px solid #dcfce7;
    border-right: 1px solid #dcfce7;
    border-bottom: 1px solid #dcfce7;
    color: #065f46;
}
.msg-box-success .msg-icon-box { color: #10b981; }
.msg-box-success .msg-close-btn { color: #047857; }

/* Error Alert Styling */
.msg-box-error {
    background-color: #fef2f2;
    border-left: 5px solid #ef4444;
    border-top: 1px solid #fee2e2;
    border-right: 1px solid #fee2e2;
    border-bottom: 1px solid #fee2e2;
    color: #991b1b;
}
.msg-box-error .msg-icon-box { color: #ef4444; }
.msg-box-error .msg-close-btn { color: #b91c1c; }

/* Information Alert Styling */
.msg-box-info {
    background-color: #eff6ff;
    border-left: 5px solid #3b82f6;
    border-top: 1px solid #dbeafe;
    border-right: 1px solid #dbeafe;
    border-bottom: 1px solid #dbeafe;
    color: #1e40af;
}
.msg-box-info .msg-icon-box { color: #3b82f6; }
.msg-box-info .msg-close-btn { color: #1d4ed8; }

/* Warning Alert Styling */
.msg-box-warning {
    background-color: #fffbeb;
    border-left: 5px solid #f59e0b;
    border-top: 1px solid #fef3c7;
    border-right: 1px solid #fef3c7;
    border-bottom: 1px solid #fef3c7;
    color: #92400e;
}
.msg-box-warning .msg-icon-box { color: #f59e0b; }
.msg-box-warning .msg-close-btn { color: #b45309; }

/* Legacy class fallbacks to ensure compatibility */
.success {
    background-color: #f0fdf4 !important;
    border-left: 5px solid #10b981 !important;
    color: #065f46 !important;
}
.error {
    background-color: #fef2f2 !important;
    border-left: 5px solid #ef4444 !important;
    color: #991b1b !important;
}
.information {
    background-color: #eff6ff !important;
    border-left: 5px solid #3b82f6 !important;
    color: #1e40af !important;
}
.warning {
    background-color: #fffbeb !important;
    border-left: 5px solid #f59e0b !important;
    color: #92400e !important;
}