/* ============================================
   تهران وان — اعلان‌های کاربر (toast)
   رنگ‌ها همان توکن‌های search-form.css هستند (--tn-*) با مقدار جایگزین.
   ============================================ */

.tn-toasts {
    position: fixed;
    inset: 0; /* تمام صفحه، اعلان دقیقاً وسط صفحه */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    pointer-events: none;
}

.tn-toast {
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--tn-line, #EDEAE3);
    border-radius: 18px;
    box-shadow: 0 14px 34px -4px rgba(15, 40, 34, .12), 0 4px 12px 0 rgba(0, 0, 0, .04);
    direction: rtl;
    font-family: inherit;
    text-align: right;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(14px) scale(.98);
    transition: opacity .28s cubic-bezier(.16, 1, .3, 1), transform .28s cubic-bezier(.16, 1, .3, 1);
}

.tn-toast.is-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tn-toast__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid transparent;
}

.tn-toast__icon svg { width: 22px; height: 22px; }

.tn-toast__text { flex: 1 1 auto; min-width: 0; }

.tn-toast__text b {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--tn-ink, #1A1C1B);
    line-height: 1.5;
}

.tn-toast__text small {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--tn-muted, #717875);
    line-height: 1.7;
}

/* کیت المنتور روی هر button پدینگ/فونت/line-height می‌گذارد و همین باعث می‌شد
   ضربدرِ بستن از مرکز بیرون بزند؛ با !important و آیکن SVG قطعی می‌شود. */
.tn-toast__close {
    flex: 0 0 auto;
    /* کیت المنتور display: block روی دکمه‌ها می‌گذارد و آیکن را از مرکز بیرون
       می‌اندازد؛ با grid و svg بلوکی، ضربدر دقیقاً وسط می‌نشیند. */
    display: grid !important;
    place-items: center;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tn-faint, #9BA3A0);
    font: inherit;
    line-height: 1 !important;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.tn-toast__close svg { display: block; width: 15px; height: 15px; }

.tn-toast__close:hover { background: var(--tn-cream-2, #F4EFE6); color: var(--tn-ink-soft, #404543); }

.tn-toast--success .tn-toast__icon {
    background: var(--tn-green-tint, #E8F3F0);
    border-color: rgba(15, 84, 70, .2);
    color: var(--tn-green, #0F5446);
}

.tn-toast--error .tn-toast__icon {
    background: #FBEBEA;
    border-color: rgba(180, 35, 31, .18);
    color: #B4231F;
}

.tn-toast--info .tn-toast__icon {
    background: var(--tn-gold-tint, #F8F3E9);
    border-color: rgba(200, 161, 90, .3);
    color: #A8813C;
}

@media (prefers-reduced-motion: reduce) {
    .tn-toast { transition: none; }
}
