.toast-container {
    position: fixed;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
    max-width: min(360px, calc(100vw - 24px));
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
}

/* Base card */
.toast {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    transform: translateY(-12px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    cursor: default;
}

/* Show animation */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-left {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.toast-inner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-left-icon {
    color: #fff;
}

.toast-left-icon svg {
    width: 10px;
    height: 10px;
}

/* SUCCESS */
.toast-success .toast-left {
    border: 4px solid rgba(50, 147, 111, 0.35);
}

.toast-success .toast-inner {
    background: #32936F;
}

/* ERROR */
.toast-error .toast-left {
    border: 4px solid rgba(248, 26, 26, 0.35);
}

.toast-error .toast-inner {
    background: #F81A1A;
}

/* WARNING */
.toast-warning .toast-left {
    border: 4px solid rgba(239, 164, 51, 0.35);
}

.toast-warning .toast-inner {
    background: #EFA433;
}

/* INFO */
.toast-info .toast-left {
    border: 4px solid rgba(31, 69, 255, 0.35);
}

.toast-info .toast-inner {
    background: #1F45FF;
}

/* Body */
.toast-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-right: 1.25rem;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: #181D27;
    line-height: 1.3;
}

.toast-message {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: #535862;
    word-break: break-word;
}

.toast--compact .toast-body {
    padding-right: 1rem;
}

.toast--compact .toast-title {
    display: none;
}

.toast--compact .toast-message {
    margin-top: 0;
    font-size: 12px;
    font-weight: 500;
    color: #181D27;
}

/* Close Button */
.toast-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 2px;
    z-index: 10;
}

.toast-close span {
    font-size: 16px;
}

.toast-success .toast-close span {
    color: #059669;
}

.toast-error .toast-close span {
    color: #dc2626;
}

.toast-warning .toast-close span {
    color: #d97706;
}

.toast-info .toast-close span {
    color: #2563eb;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 10px 10px;
    animation: progress linear;
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.toast:hover .toast-progress {
    animation-play-state: paused;
}

.toast:hover {
    transform: translateX(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

@media (max-width: 640px) {
    .toast-container {
        top: auto;
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .toast {
        max-width: none;
    }
}
