:root {
    --os-toast-font: "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --os-toast-text: #181c32;
    --os-toast-muted: #64748b;
    --os-toast-surface: #fff;
    --os-toast-border: #e8edf4;
    --os-toast-radius: 12px;
    --os-toast-accent: #ff7a00;
    --os-toast-success: #16a34a;
    --os-toast-error: #dc2626;
    --os-toast-warning: #ea580c;
    --os-toast-info: #ff7a00;
}

.os-toast-container.swal2-container {
    inset: 0 0 auto auto !important;
    padding: 0.85rem 0.85rem 0 0;
    pointer-events: none;
    z-index: 20000;
}

.os-toast-container.swal2-container.swal2-top-end {
    align-items: flex-start;
    justify-content: flex-end;
}

.os-toast-container .swal2-popup {
    pointer-events: auto;
}

.os-toast-popup.swal2-popup.swal2-toast {
    background: var(--os-toast-surface);
    border: 1px solid var(--os-toast-border);
    border-radius: var(--os-toast-radius);
    box-shadow: 0 8px 24px rgba(24, 28, 50, 0.1);
    box-sizing: border-box;
    color: var(--os-toast-text);
    display: block !important;
    font-family: var(--os-toast-font);
    grid-template-columns: none !important;
    height: auto !important;
    margin: 0;
    max-height: none !important;
    max-width: min(360px, calc(100vw - 1.5rem));
    overflow: hidden;
    padding: 0 !important;
    position: relative;
    width: min(360px, calc(100vw - 1.5rem));
}

.os-toast-popup.swal2-toast .os-toast-message.swal2-html-container {
    grid-column: auto !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
    padding: 10px 30px 10px 12px !important;
    text-align: left;
    white-space: normal !important;
    word-wrap: break-word;
}

.os-toast-body {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    width: 100%;
}

.os-toast-icon-wrap {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    line-height: 1;
    margin-top: 2px;
}

.os-toast-icon-wrap i {
    font-size: 0.95rem;
}

.os-toast-icon-success { color: var(--os-toast-success); }
.os-toast-icon-error { color: var(--os-toast-error); }
.os-toast-icon-warning { color: var(--os-toast-warning); }
.os-toast-icon-info { color: var(--os-toast-info); }

.os-toast-msg {
    color: var(--os-toast-text);
    flex: 1 1 auto;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.os-toast-msg .small,
.os-toast-msg small {
    color: var(--os-toast-muted);
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 2px;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.os-toast-msg ul {
    margin: 4px 0 0;
    padding-left: 1.1rem;
}

.os-toast-msg ul li {
    line-height: 1.4;
    margin: 0 0 2px;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.os-toast-msg ul li:last-child {
    margin-bottom: 0;
}

.os-toast-popup.swal2-toast .os-toast-close.swal2-close {
    align-self: auto !important;
    color: #94a3b8;
    font-size: 1.2rem;
    grid-column: auto !important;
    grid-row: auto !important;
    height: 22px;
    line-height: 22px;
    margin: 0 !important;
    opacity: 1;
    position: absolute;
    right: 6px;
    top: 6px;
    transition: color 0.15s ease;
    width: 22px;
    z-index: 2;
}

.os-toast-popup .os-toast-close.swal2-close:hover {
    color: var(--os-toast-text);
}

.os-toast-popup .swal2-timer-progress-bar-container {
    background: #f1f5f9;
    height: 2px;
    inset: auto 0 0 0;
    margin: 0;
    position: absolute;
    width: 100%;
}

.os-toast-popup .os-toast-progress.swal2-timer-progress-bar {
    background: var(--os-toast-accent);
    height: 100%;
    opacity: 0.85;
}

.os-toast-popup .os-toast-progress-success.swal2-timer-progress-bar {
    background: var(--os-toast-success);
}

.os-toast-popup .os-toast-progress-error.swal2-timer-progress-bar {
    background: var(--os-toast-error);
}

.os-toast-popup .os-toast-progress-warning.swal2-timer-progress-bar {
    background: var(--os-toast-warning);
}

.os-toast-popup .os-toast-progress-info.swal2-timer-progress-bar {
    background: var(--os-toast-info);
}

@keyframes os-toast-in {
    from {
        opacity: 0;
        transform: translate3d(10px, -6px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes os-toast-out {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    to {
        opacity: 0;
        transform: translate3d(8px, -4px, 0);
    }
}

.os-toast-animate-in {
    animation: os-toast-in 0.24s ease both;
}

.os-toast-animate-out {
    animation: os-toast-out 0.18s ease both;
}

@media (max-width: 575.98px) {
    .os-toast-container.swal2-container {
        padding: 0.65rem 0.65rem 0;
    }

    .os-toast-popup.swal2-popup.swal2-toast {
        max-width: calc(100vw - 1.1rem);
        width: calc(100vw - 1.1rem);
    }

    .os-toast-popup.swal2-toast .os-toast-message.swal2-html-container {
        padding: 10px 28px 10px 11px !important;
    }

    .os-toast-msg {
        font-size: 0.86rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .os-toast-animate-in,
    .os-toast-animate-out {
        animation: none;
    }
}
