/* --- 9-Position Toast Containers --- */
.toast-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none; /* Allows clicking through empty container space */
    max-width: 320px;
    width: 100%;
    padding: 5px 25px;
    z-index: 15000;
    /* border: 1px solid red; */
}

/* Y-Axis: Top */
.top-left {
    top: 0;
    left: 0;
    align-items: flex-start;
}
.top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}
.top-right {
    top: 0;
    right: 0;
    align-items: flex-end;
}

/* Y-Axis: Middle */
.middle-left {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    align-items: flex-start;
}
.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
}
.middle-right {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    align-items: flex-end;
}

/* Y-Axis: Bottom */
.bottom-left {
    bottom: 0;
    left: 0;
    align-items: flex-start;
}
.bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}
.bottom-right {
    bottom: 0;
    right: 0;
    align-items: flex-end;
}

/* --- Toast Notification Styling --- */
.toast {
    pointer-events: auto; /* Re-enable clicks for the toast itself */
    background-color: #ffffff;
    color: #1e293b;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    animation: toastFadeIn 0.3s ease-out forwards;
    border-left: 5px solid #cbd5e1;
    border-right: 5px solid #cbd5e1;
}

/* Status Colors */
.toast.success {
    border-left-color: #10b981;
    border-right-color: #10b981;
}
.toast.info {
    border-left-color: #3b82f6;
    border-right-color: #3b82f6;
}
.toast.warning {
    border-left-color: #f59e0b;
    border-right-color: #f59e0b;
}
.toast.error {
    border-left-color: #ef4444;
    border-right-color: #ef4444;
}

.toast-content {
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
    padding-right: 10px;
}

.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.toast-close:hover {
    /* color: #64748b; */
    color: black;
}

/* Animation */
@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.toast.fade-out {
    animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}
