/**
 * Modern Responsive Toasts Stylesheet
 * High z-index priority layer to render above all modals, overlays, and sticky headers.
 * Uses Tiranga design tokens and vector icon wrappers. Zero !important flags.
 *
 * @package mi-theme
 * @version 2.4.0
 */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 32px);
    pointer-events: none;
}

.toast-message {
    background-color: var(--color-primary, #0F172A);
    color: #FFFFFF;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui, sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    
    transform: translateY(20px);
    opacity: 0;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-sizing: border-box;
}

.toast-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.18);
    color: #22C55E;
    flex-shrink: 0;
}

.toast-icon-wrap svg {
    width: 16px;
    height: 16px;
}

.toast-error .toast-icon-wrap {
    background: rgba(220, 38, 38, 0.18);
    color: #EF4444;
}

.toast-message.toast-success {
    border-left: 4px solid var(--color-india-green-dark, #16A34A);
}

.toast-message.toast-error {
    border-left: 4px solid #EF4444;
}

.toast-message.hide {
    animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastFadeOut {
    to {
        transform: translateY(12px);
        opacity: 0;
    }
}

@media (max-width: 640px) {
    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: calc(100% - 32px);
        max-width: none;
    }
}
