/* toast.css — Reusable toast notification system */

@keyframes toast-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-slide-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
    width: calc(100% - 40px);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: toast-slide-in 0.3s ease;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.toast.toast-exiting {
    animation: toast-slide-out 0.3s ease forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    color: #666;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
}

/* Success */
.toast-success {
    border-left: 4px solid #2e7d32;
}
.toast-success .toast-icon {
    background: #2e7d32;
}
.toast-success .toast-title {
    color: #2e7d32;
}

/* Error */
.toast-error {
    border-left: 4px solid #c62828;
}
.toast-error .toast-icon {
    background: #c62828;
}
.toast-error .toast-title {
    color: #c62828;
}

/* Warning */
.toast-warning {
    border-left: 4px solid #daa520;
}
.toast-warning .toast-icon {
    background: #daa520;
}
.toast-warning .toast-title {
    color: #b8860b;
}

/* Info */
.toast-info {
    border-left: 4px solid #1565c0;
}
.toast-info .toast-icon {
    background: #1565c0;
}
.toast-info .toast-title {
    color: #1565c0;
}

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