/* Base toast */
.modern-toast {
    display: flex !important;
    align-items: center !important;
    /* Ensures vertical centering */
    justify-content: flex-start !important;
    gap: 12px;
    padding: 16px 20px !important;
    /* Increased padding for better look & height */
    min-width: 280px;
    max-width: 400px;
    height: auto !important;
    /* Fixes fixed height clipping issues */
    min-height: auto !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    box-sizing: border-box !important;
}

/* Title text */
.modern-toast-title {
    flex: 1 !important;
    /* Takes up remaining space */
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    /* Improved line height for centering */
    color: #fff !important;
    text-align: left;
    white-space: normal !important;
    /* Allows text to wrap properly */
    word-break: break-word;
}

/* Icon */
.modern-toast-icon {
    flex-shrink: 0 !important;
    /* Prevents icon from squishing */
    width: 20px !important;
    /* Slightly larger for balance */
    height: 20px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Success */
.modern-toast.swal2-icon-success {
    background-color: #16a34a !important;
}

/* Error */
.modern-toast.swal2-icon-error {
    background-color: #dc2626 !important;
}

/* Warning */
.modern-toast.swal2-icon-warning {
    background-color: #f59e0b !important;
}

/* Info */
.modern-toast.swal2-icon-info {
    background-color: #2563eb !important;
}

/* --- Bootstrap Compatibility Overrides --- */

/* Ensure Bootstrap's hidden state works despite our flex definition */
.toast.modern-toast:not(.show):not(.showing) {
    display: none !important;
}

/* Ensure flex layout is active when Bootstrap shows the toast */
.toast.modern-toast.show,
.toast.modern-toast.showing {
    display: flex !important;
}

/* Remove default Bootstrap toast borders and background colors */
.toast.modern-toast {
    border: none !important;
    /* Allow the specific type colors (success/error) to be the background */
    background-color: transparent;
}
