﻿/* ================================
   TOAST NOTIFICATION
   Başarı, hata, bilgi mesajları
   ================================ */

/* ===== TOAST CONTAINER ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    pointer-events: none;
}

@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
}

/* ===== TOAST ===== */
.toast {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(400px);
    animation: slideIn 0.3s ease forwards;
    position: relative;
    overflow: hidden;
}

@media (max-width: 576px) {
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

.toast.removing {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ===== TOAST TYPES ===== */
.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* ===== TOAST ICON ===== */
.toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
}

.toast.success .toast-icon {
    background: rgba(102, 187, 106, 0.1);
    color: var(--success);
}

.toast.error .toast-icon {
    background: rgba(239, 83, 80, 0.1);
    color: var(--error);
}

.toast.warning .toast-icon {
    background: rgba(255, 167, 38, 0.1);
    color: var(--warning);
}

.toast.info .toast-icon {
    background: rgba(66, 165, 245, 0.1);
    color: var(--info);
}

/* ===== TOAST CONTENT ===== */
.toast-content {
    flex: 1;
}

.toast-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.toast-message {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== TOAST CLOSE ===== */
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
}

    .toast-close:hover {
        background: var(--bg-light);
        color: var(--text-primary);
    }

/* ===== PROGRESS BAR ===== */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-green);
    animation: progress 5s linear forwards;
}

.toast.success .toast-progress {
    background: var(--success);
}

.toast.error .toast-progress {
    background: var(--error);
}

.toast.warning .toast-progress {
    background: var(--warning);
}

.toast.info .toast-progress {
    background: var(--info);
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}
