.hdv2-install-toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9998;
    width: min(360px, calc(100% - 2rem));
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.hdv2-install-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    background: var(--hdv2-cah-card, #ffffff);
    color: var(--hdv2-cah-fg, #111827);
    border: 1px solid var(--hdv2-cah-border, #e5e7eb);
    border-radius: 0.75rem;
    box-shadow: 0 16px 38px hsl(0 0% 0% / 0.18);
    text-decoration: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.28s ease, margin 0.28s ease;
}

/* ------------ KART DESTESI ETKISI (mobil + desktop ortak) ------------
   En yeni toast `:last-child` (appendChild ile en sonda).
   Default (collapsed): newest onde, oncekiler arkadan peek yapar.
   Hover (desktop) veya .is-expanded (mobil tap) ile deste acilir.
*/
.hdv2-install-toast-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Collapsed: oncekileri negatif margin ile newest'in icine cek */
.hdv2-install-toast-stack:not(.is-expanded) .hdv2-install-toast:not(:last-child) {
    margin-bottom: -3.5rem;
    transform: scale(0.96);
    opacity: 0.75;
    box-shadow: 0 8px 20px hsl(0 0% 0% / 0.10);
    z-index: 2;
}

.hdv2-install-toast-stack:not(.is-expanded) .hdv2-install-toast:nth-last-child(3),
.hdv2-install-toast-stack:not(.is-expanded) .hdv2-install-toast:nth-last-child(3) ~ .hdv2-install-toast:not(:last-child) {
    margin-bottom: -3.8rem;
    transform: scale(0.92);
    opacity: 0.5;
    z-index: 1;
}

.hdv2-install-toast-stack:not(.is-expanded) .hdv2-install-toast:nth-last-child(n+4) {
    opacity: 0;
    pointer-events: none;
    margin-bottom: -4rem;
    z-index: 0;
}

.hdv2-install-toast-stack:not(.is-expanded) .hdv2-install-toast:last-child {
    z-index: 5;
}

/* Acik: butun toast'lar yan yana, scale 1 + tam opasite */
.hdv2-install-toast-stack.is-expanded .hdv2-install-toast {
    transform: scale(1);
    opacity: 1;
    margin-bottom: 0;
    margin-top: 0.55rem;
}

.hdv2-install-toast-stack.is-expanded .hdv2-install-toast:first-child {
    margin-top: 0;
}

/* Desktop: hover ile de acilsin */
@media (hover: hover) and (min-width: 769px) {
    .hdv2-install-toast-stack:hover .hdv2-install-toast {
        transform: scale(1);
        opacity: 1;
        margin-bottom: 0;
        margin-top: 0.55rem;
    }
    .hdv2-install-toast-stack:hover .hdv2-install-toast:first-child {
        margin-top: 0;
    }
}

/* Stack count indicator: kac toast oldugunu solda gosterir */
.hdv2-install-toast-stack__count {
    position: absolute;
    top: -0.55rem;
    left: -0.55rem;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.45rem;
    background: hsl(217.2 91.2% 59.8%);
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px hsl(217 91% 50% / 0.35);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.hdv2-install-toast-stack.has-multiple:not(.is-expanded):not(:hover) .hdv2-install-toast-stack__count {
    opacity: 1;
    transform: scale(1);
}

.hdv2-install-toast:hover {
    text-decoration: none;
    color: var(--hdv2-cah-fg, #111827);
    border-color: hsl(217.2 91.2% 59.8% / 0.55);
}

.hdv2-install-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hdv2-install-toast.is-done {
    border-color: hsl(142 60% 60%);
    background: hsl(142 70% 96%);
}

.hdv2-install-toast.is-error {
    border-color: hsl(0 80% 80%);
    background: hsl(0 84% 96%);
    color: hsl(0 72% 36%);
}

.hdv2-install-toast__spinner {
    width: 1.75rem;
    height: 1.75rem;
    border: 2.5px solid var(--hdv2-cah-border, #e5e7eb);
    border-top-color: hsl(217.2 91.2% 59.8%);
    border-radius: 50%;
    animation: hdv2-it-spin 0.85s linear infinite;
    flex-shrink: 0;
}

.hdv2-install-toast.is-done .hdv2-install-toast__spinner {
    border: 0;
    background: hsl(142 70% 45%);
    color: #fff;
    animation: none;
    position: relative;
}

.hdv2-install-toast.is-done .hdv2-install-toast__spinner::before {
    content: '\2713';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.hdv2-install-toast.is-error .hdv2-install-toast__spinner {
    border-color: hsl(0 60% 80%);
    border-top-color: hsl(0 78% 56%);
    animation: none;
}

@keyframes hdv2-it-spin {
    to { transform: rotate(360deg); }
}

.hdv2-install-toast__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.hdv2-install-toast__title {
    font-size: 0.84rem;
    font-weight: 700;
    color: inherit;
}

.hdv2-install-toast.is-comfort [data-hdv2-toast-step] {
    color: hsl(32 42% 38%);
    font-weight: 500;
}

.hdv2-install-toast__coffee {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.05rem;
    height: 1.05rem;
    color: hsl(32 72% 46%);
}

.hdv2-install-toast__coffee svg {
    width: 100%;
    height: 100%;
}

.hdv2-install-toast__meta {
    font-size: 0.74rem;
    color: var(--hdv2-cah-muted, #6b7280);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.hdv2-install-toast__sep {
    opacity: 0.6;
}

.hdv2-install-toast__percent {
    font-variant-numeric: tabular-nums;
}

.hdv2-install-toast__bar {
    margin-top: 0.25rem;
    height: 0.28rem;
    border-radius: 999px;
    background: var(--hdv2-cah-border, #e5e7eb);
    overflow: hidden;
}

.hdv2-install-toast__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, hsl(217 91% 60%), hsl(217 91% 50%));
    transition: width 0.5s ease;
}

.hdv2-install-toast__bar.is-loading span {
    width: 36% !important;
    background: linear-gradient(90deg, transparent, hsl(217 91% 60% / 0.75), transparent);
    animation: hdv2-toast-shimmer 1.1s ease-in-out infinite;
}

@keyframes hdv2-toast-shimmer {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

.hdv2-install-toast.is-done .hdv2-install-toast__bar span {
    background: linear-gradient(90deg, hsl(142 70% 45%), hsl(142 70% 38%));
}

.hdv2-install-toast__close {
    background: transparent;
    border: 0;
    color: var(--hdv2-cah-muted, #6b7280);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 0.4rem;
    flex-shrink: 0;
    align-self: flex-start;
}

.hdv2-install-toast__close svg {
    width: 0.95rem;
    height: 0.95rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hdv2-install-toast__close:hover {
    color: var(--hdv2-cah-fg, #111827);
    background: var(--hdv2-cah-accent, #f3f4f6);
}

@media (max-width: 600px) {
    .hdv2-install-toast-stack {
        right: 0.5rem;
        left: 0.5rem;
        bottom: 0.5rem;
        width: auto;
    }
}
