﻿/* Toast container (top-right) */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1%;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
    direction: rtl;
    font-family: 'peyda';
}

/* Single toast */
.toast {
    pointer-events: auto;
    min-width: 260px;
    max-width: 420px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transform-origin: top right;
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    transition: transform 240ms cubic-bezier(.2,.9,.3,1), opacity 200ms;
    color: #0b0b0b;
    background: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    border-left: 6px solid transparent;
}

    .toast.show {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    .toast .icon {
        font-size: 18px;
        line-height: 1;
        width: 28px;
        text-align: center;
        margin-top: 2px;
        flex-shrink: 0;
    }

    .toast .content {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .toast .title {
        font-weight: 600;
        font-size: 14px;
        margin-bottom: 3px;
        font-family: 'peyda';
    }

    .toast .message {
        font-size: 13px;
        line-height: 1.3;
        color: #333;
        word-break: break-word;
        font-family: 'peyda';
    }

    .toast .close-btn {
        margin-left: 8px;
        background: transparent;
        border: none;
        font-size: 16px;
        cursor: pointer;
        color: #666;
        padding: 4px;
        border-radius: 6px;
    }

        .toast .close-btn:hover {
            background: rgba(0,0,0,0.04);
        }

    /* types */
    .toast.toast-success {
        border-left-color: #2ecc71;
    }

    .toast.toast-error {
        border-left-color: #e74c3c;
    }

    .toast.toast-info {
        border-left-color: #3498db;
    }

    .toast.toast-warning {
        border-left-color: #f39c12;
    }

/* small icon colors */
.toast-success .icon {
    color: #27ae60;
}

.toast-error .icon {
    color: #c0392b;
}

.toast-info .icon {
    color: #2980b9;
}

.toast-warning .icon {
    color: #d35400;
}

/* progress bar */
.toast .progress {
    height: 4px;
    width: 100%;
    background: rgba(0,0,0,0.06);
    border-radius: 999px;
    margin-top: 8px;
    overflow: hidden;
}

    .toast .progress > i {
        display: block;
        height: 100%;
        width: 100%;
        transform-origin: left;
        transform: scaleX(1);
        transition: transform linear;
        background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.0));
    }

/* small responsive tweak */
@media (max-width: 480px) {
    .toast-container {
        left: 0;
        right: 0;
        justify-content: center;
        top: 0.6rem;
        padding: 0 0.6rem;
    }

    .toast {
        width: 100%;
        max-width: none;
        border-radius: 8px;
    }
}
