/**
 * KS Toast – tüm bildirimler için ortak bileşen.
 * Varyantlar: success, error, danger, warning, info, default.
 * İkon, başlık, açıklama, fotoğraf, link, buton; konum: üst/alt orta/sol/sağ.
 * Kapatma: flex ile hizalı (parent transform + child translateY birikmesi yok).
 * 1 toast: küçülen yığın. 2+ toast, fare dışı: deck (scale/opak).
 * 2+ toast, hover/odak: .ks-toast--stack-expanded ile gap + tam opak.
 */

:root {
    --ks-toast-step: 8px;
    /* 2+ yığında genişletildiğinde: konteyner row-gap (column + column-reverse) */
    --ks-toast-stack-gap: 18px;
    /* Tüm modallar, sticky header, drawer vb. üzerinde kalsın */
    --ks-toast-z-index: 2147483000;
}

/*
 * <dialog showModal()> Top Layer: body’deki en yüksek z-index bile modalın altında kalır.
 * Açık :modal varken toast sarmalayıcıları .ks-toast-dialog-host içine taşınır; host, panel+scrim üstünde.
 */
.ks-toast-dialog-host {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* Sarmalayıcı: konum sınıfları (üst-orta/alt-orta: left:50% + translateX yerine margin — scrollbar / subpixel) */
.ks-toast-wrapper {
    position: fixed;
    z-index: var(--ks-toast-z-index);
    width: 100%;
    max-width: 420px;
    padding: 0 12px;
    pointer-events: none;
}

.ks-toast-wrapper--top-center {
    top: 16px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}

.ks-toast-wrapper--top-left {
    top: 16px;
    left: 16px;
    right: auto;
}

.ks-toast-wrapper--top-right {
    top: 16px;
    left: auto;
    right: 16px;
}

/* Alt konumlar: içerik alta yapışık, taşma üstten kesilir, scroll yok */
.ks-toast-wrapper--bottom-center {
    top: auto;
    bottom: 16px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
}

.ks-toast-wrapper--bottom-left {
    top: auto;
    bottom: 16px;
    left: 16px;
    right: auto;
    transform: none;
    width: max-content;
    max-width: min(420px, 90vw);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
}

.ks-toast-wrapper--bottom-right {
    top: auto;
    bottom: 16px;
    left: auto;
    right: 16px;
    transform: none;
    width: max-content;
    max-width: min(420px, 90vw);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
}

/* Alt konumlar: column (en yeni altta), wrapper flex child alta yapışık */
.ks-toast-wrapper--bottom-center .ks-toast-container,
.ks-toast-wrapper--bottom-left .ks-toast-container,
.ks-toast-wrapper--bottom-right .ks-toast-container {
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
}

/* Alt sol/sağ: container içeriğe göre genişlesin, ortaya kaymasın */
.ks-toast-wrapper--bottom-left .ks-toast-container,
.ks-toast-wrapper--bottom-right .ks-toast-container {
    width: fit-content;
    max-width: 100%;
}

.ks-toast-wrapper--bottom-center .ks-toast-container .ks-toast,
.ks-toast-wrapper--bottom-left .ks-toast-container .ks-toast,
.ks-toast-wrapper--bottom-right .ks-toast-container .ks-toast {
    transform-origin: bottom center;
}

/* Alt: varsayılan stack – en yeni altta tam, üsttekiler küçük (translateY 0, margin ile üst üste) */
.ks-toast-wrapper--bottom-center .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--bottom-left .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--bottom-right .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(1) {
    transform: scale(1) translateY(0);
    animation: ks-toast-in-bottom 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.ks-toast-wrapper--bottom-center .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(2),
.ks-toast-wrapper--bottom-left .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(2),
.ks-toast-wrapper--bottom-right .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(2) {
    transform: scale(0.8) translateY(0);
    margin-bottom: -20px;
}

.ks-toast-wrapper--bottom-center .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(3),
.ks-toast-wrapper--bottom-left .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(3),
.ks-toast-wrapper--bottom-right .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(3) {
    transform: scale(0.64) translateY(0);
    margin-bottom: -16px;
}

.ks-toast-wrapper--bottom-center .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--bottom-left .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--bottom-right .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(n+4) {
    transform: scale(0.5) translateY(0);
    margin-bottom: 0;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    min-height: 0;
    border: none;
}

.ks-toast-wrapper.has-toasts {
    pointer-events: auto;
}

/* Üst: 2+ yığın, genişletilmiş (JS: mouseenter) — tıklanabilir alan */
.ks-toast-wrapper--top-center.ks-toast--stack-expanded:has(> .ks-toast-container > .ks-toast:nth-child(2)),
.ks-toast-wrapper--top-left.ks-toast--stack-expanded:has(> .ks-toast-container > .ks-toast:nth-child(2)),
.ks-toast-wrapper--top-right.ks-toast--stack-expanded:has(> .ks-toast-container > .ks-toast:nth-child(2)) {
    min-height: 70vh;
}

.ks-toast-container {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    max-width: 90vw;
    pointer-events: none;
    /* 3B perspective + hover’da yığında transform, imleç altında oynamaya yol açabiliyor */
    perspective: none;
}

.ks-toast-wrapper--top-left .ks-toast-container,
.ks-toast-wrapper--bottom-left .ks-toast-container {
    align-items: flex-start;
}

.ks-toast-wrapper--top-right .ks-toast-container,
.ks-toast-wrapper--bottom-right .ks-toast-container {
    align-items: flex-end;
}

.ks-toast-container .ks-toast {
    pointer-events: auto;
    margin: 0;
    /* Y sarsıntısı: margin/padding/max-height geçişi yok; sarmalayıcı sınıfı (JS) tek kaynak */
    transition: none;
    transform-origin: top center;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    padding: 12px 12px 12px 16px;
    font-weight: 500;
    font-size: 14px;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
}

.ks-toast-container .ks-toast > .ks-toast__inner,
.ks-toast-container .ks-toast > .ks-toast__message {
    flex: 1 1 auto;
    min-width: 0;
}

/* Üst konumlar: stack (genel kurallar alt konuma UYGULANMAZ) */
.ks-toast-wrapper--top-center .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--top-left .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--top-right .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(1) {
    transform: scale(1) translateY(0);
    z-index: 10;
    opacity: 1;
    animation: ks-toast-in 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.ks-toast-wrapper--top-center .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(2),
.ks-toast-wrapper--top-left .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(2),
.ks-toast-wrapper--top-right .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(2) {
    transform: scale(0.8) translateY(-16px);
    z-index: 9;
    margin-bottom: -20px;
    opacity: 0.9;
}

.ks-toast-wrapper--top-center .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(3),
.ks-toast-wrapper--top-left .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(3),
.ks-toast-wrapper--top-right .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(3) {
    transform: scale(0.64) translateY(-28px);
    z-index: 8;
    margin-bottom: -16px;
    opacity: 0.78;
}

.ks-toast-wrapper--top-center .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--top-left .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--top-right .ks-toast-container:not(:has(> .ks-toast:nth-child(2))) .ks-toast:nth-last-child(n+4) {
    transform: scale(0.5) translateY(-40px);
    z-index: 7;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
    min-height: 0;
}

/* 2+ toast, collapsed: deck (küçük, opaklık, üst üste) */
.ks-toast-wrapper--bottom-center:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--bottom-left:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--bottom-right:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1) {
    transform: scale(1) translateY(0);
    animation: ks-toast-in-bottom 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.ks-toast-wrapper--bottom-center:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(2),
.ks-toast-wrapper--bottom-left:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(2),
.ks-toast-wrapper--bottom-right:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(2) {
    transform: scale(0.8) translateY(0);
    margin-bottom: -20px;
}

.ks-toast-wrapper--bottom-center:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(3),
.ks-toast-wrapper--bottom-left:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(3),
.ks-toast-wrapper--bottom-right:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(3) {
    transform: scale(0.64) translateY(0);
    margin-bottom: -16px;
}

.ks-toast-wrapper--bottom-center:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--bottom-left:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--bottom-right:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4) {
    transform: scale(0.5) translateY(0);
    margin-bottom: 0;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    min-height: 0;
    border: none;
}

.ks-toast-wrapper--top-center:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--top-left:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--top-right:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1) {
    transform: scale(1) translateY(0);
    z-index: 10;
    opacity: 1;
    animation: ks-toast-in 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.ks-toast-wrapper--top-center:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(2),
.ks-toast-wrapper--top-left:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(2),
.ks-toast-wrapper--top-right:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(2) {
    transform: scale(0.8) translateY(-16px);
    z-index: 9;
    margin-bottom: -20px;
    opacity: 0.9;
}

.ks-toast-wrapper--top-center:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(3),
.ks-toast-wrapper--top-left:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(3),
.ks-toast-wrapper--top-right:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(3) {
    transform: scale(0.64) translateY(-28px);
    z-index: 8;
    margin-bottom: -16px;
    opacity: 0.78;
}

.ks-toast-wrapper--top-center:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--top-left:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--top-right:not(.ks-toast--stack-expanded) .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4) {
    transform: scale(0.5) translateY(-40px);
    z-index: 7;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
    min-height: 0;
}

/* 2+ toast, genişletilmiş (stack-expanded): flex gap, tam opak, 4. ve sonrası görünür */
.ks-toast-wrapper--top-center.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--top-left.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--top-right.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1) {
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: ks-toast-in 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.ks-toast-wrapper--top-center.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+2),
.ks-toast-wrapper--top-left.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+2),
.ks-toast-wrapper--top-right.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+2) {
    opacity: 1;
}

.ks-toast-wrapper--top-center.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--top-left.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--top-right.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4) {
    visibility: visible;
    max-height: 120px;
    overflow: visible;
    padding: 12px 12px 12px 16px;
    min-height: auto;
}

/* 2+ expanded: aralık sadece konteynerde gap/row-gap (alt/üst cift; margin toasts ile cakisirdi) */
.ks-toast-wrapper.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) {
    row-gap: var(--ks-toast-stack-gap);
    column-gap: 0;
    gap: var(--ks-toast-stack-gap) 0;
}

.ks-toast-wrapper--top-center.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast,
.ks-toast-wrapper--top-left.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast,
.ks-toast-wrapper--top-right.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast,
.ks-toast-wrapper--bottom-center.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast,
.ks-toast-wrapper--bottom-left.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast,
.ks-toast-wrapper--bottom-right.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast {
    transform: scale(1) translateY(0);
}

.ks-toast-wrapper--bottom-center.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--bottom-left.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1),
.ks-toast-wrapper--bottom-right.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(1) {
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: ks-toast-in-bottom 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.ks-toast-wrapper--bottom-center.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+2),
.ks-toast-wrapper--bottom-left.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+2),
.ks-toast-wrapper--bottom-right.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+2) {
    opacity: 1;
}

.ks-toast-wrapper--bottom-center.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--bottom-left.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4),
.ks-toast-wrapper--bottom-right.ks-toast--stack-expanded .ks-toast-container:has(> .ks-toast:nth-child(2)) .ks-toast:nth-last-child(n+4) {
    visibility: visible;
    max-height: 120px;
    overflow: visible;
    padding: 12px 12px 12px 16px;
    min-height: auto;
}

/* ---------- Varyantlar: success, error, danger, warning, info, default ---------- */
.ks-toast-container .ks-toast--success {
    background: #22c55e;
    color: #fff;
}

.ks-toast-container .ks-toast--success::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 0 0 10px 10px;
    animation: ks-toast-shrink 2.8s linear forwards;
}

.ks-toast-container .ks-toast--error,
.ks-toast-container .ks-toast--danger {
    background: #ef4444;
    color: #fff;
}

.ks-toast-container .ks-toast--error::after,
.ks-toast-container .ks-toast--danger::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 0 0 10px 10px;
    animation: ks-toast-shrink 2.8s linear forwards;
}

.ks-toast-container .ks-toast--warning {
    background: #f59e0b;
    color: #fff;
}

.ks-toast-container .ks-toast--warning::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 0 0 10px 10px;
    animation: ks-toast-shrink 2.8s linear forwards;
}

.ks-toast-container .ks-toast--info {
    background: #3b82f6;
    color: #fff;
}

.ks-toast-container .ks-toast--info::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 0 0 10px 10px;
    animation: ks-toast-shrink 2.8s linear forwards;
}

.ks-toast-container .ks-toast--default {
    background: #64748b;
    color: #fff;
}

.ks-toast-container .ks-toast--default::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 0 0 10px 10px;
    animation: ks-toast-shrink 2.8s linear forwards;
}

/* ---------- İkonlu / başlıklı / linkli / butonlu yapı ---------- */
.ks-toast__inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-right: 0;
}

.ks-toast__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    opacity: 0.95;
}

/* Font Awesome yokken icon: true — sistem fontu ile Unicode glif */
.ks-toast__glyph {
    font-family: system-ui, 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ks-toast.ks-toast--has-icon {
    padding-left: 14px;
}

.ks-toast__content {
    flex: 1;
    min-width: 0;
}

.ks-toast__title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    opacity: 0.95;
}

.ks-toast__message {
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-line;
}

.ks-toast__description {
    font-size: 12px;
    line-height: 1.35;
    margin-top: 4px;
    opacity: 0.9;
    white-space: pre-line;
}

/* Küçük fotoğraflı toast */
.ks-toast__img {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.2);
}

.ks-toast.ks-toast--has-img .ks-toast__inner {
    gap: 12px;
}

.ks-toast__actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ks-toast__link {
    color: inherit;
    text-decoration: underline;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
}

.ks-toast__link:hover {
    opacity: 1;
    text-decoration: underline;
}

.ks-toast__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    text-decoration: none;
    transition: background 0.2s;
}

.ks-toast__btn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: inherit;
}

@keyframes ks-toast-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes ks-toast-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Alt konumda yeni toast: aşağıdan yukarı küçükten büyüğe */
@keyframes ks-toast-in-bottom {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Son çocuk: eski absolute + translateY(-50%) parent scale ile X’i titretiyordu */
.ks-toast-container .ks-toast-close {
    position: static;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    box-sizing: border-box;
    transform: none;
    top: auto;
    right: auto;
    left: auto;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.9;
    border-radius: 6px;
    align-self: center;
}

.ks-toast-container .ks-toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}
