/* ─── Premium Toast ─── */
#toast-container {
    position: fixed;
    top: var(--topbar-height, 80px);
    right: 20px;
    z-index: 2147483000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    pointer-events: all;
    width: 340px;
    background: var(--surface-800, #0f0f0f);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-item.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-item.toast-hide {
    transform: translateX(calc(100% + 30px));
    opacity: 0;
}

.toast-body {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
}

.toast-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
}

.toast-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

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

.toast-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-on-dark, #f1f5f9);
    line-height: 1.3;
    margin-bottom: 2px;
}

.toast-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
    max-height: 60px;
    overflow-y: auto;
    white-space: normal;
    word-break: break-word;
    padding-right: 4px;
}

/* Premium Scrollbar for Toast Subtitle */
.toast-subtitle::-webkit-scrollbar {
    width: 4px;
}
.toast-subtitle::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}
.toast-subtitle::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}
.toast-subtitle::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toast-close {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.toast-item:hover .toast-close {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.toast-progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.toast-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border-radius: 0 2px 2px 0;
    transition: none;
}

/* Type renkleri */
.toast-item[data-type="success"] {
    border-color: color-mix(in srgb, var(--success-color, #10b981) 25%, transparent);
}
.toast-item[data-type="success"] .toast-progress-fill {
    background: linear-gradient(90deg, var(--success-color, #10b981), color-mix(in srgb, var(--success-color, #10b981) 70%, #fff));
    box-shadow: 0 0 8px color-mix(in srgb, var(--success-color, #10b981) 50%, transparent);
}
.toast-item[data-type="success"] .toast-logo {
    background: color-mix(in srgb, var(--success-color, #10b981) 12%, transparent);
}

.toast-item[data-type="error"] {
    border-color: rgba(var(--primary), 0.2);
}
.toast-item[data-type="error"] .toast-progress-fill {
    background: linear-gradient(90deg, var(--brand-red), var(--brand-red));
    box-shadow: 0 0 8px rgba(var(--primary), 0.5);
}
.toast-item[data-type="error"] .toast-logo {
    background: rgba(var(--primary), 0.1);
}

.toast-item[data-type="info"] {
    border-color: rgba(var(--primary), 0.2);
}
.toast-item[data-type="info"] .toast-progress-fill {
    background: linear-gradient(90deg, var(--accent-hover, #d97706), var(--brand-red));
    box-shadow: 0 0 8px rgba(var(--primary), 0.5);
}
.toast-item[data-type="info"] .toast-logo {
    background: rgba(var(--primary), 0.1);
}

@media (max-width: 480px) {
    #toast-container {
        right: 12px;
        left: 12px;
    }
    .toast-item {
        width: 100%;
    }
}
