/* ========================================
   TOAST NOTIFICATIONS
   Современная система уведомлений
========================================= */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: clamp(280px, 90vw, 320px); /* Mobile */
    pointer-events: none;
}

/* Tablet */
@media (min-width: 768px) {
    .toast-container {
        width: clamp(320px, 40vw, 400px);
        top: 20px;
        right: 20px;
    }
}

.toast {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: opacity var(--duration-normal, 0.3s) ease,
                transform var(--duration-normal, 0.3s) cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

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

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    line-height: 1.2;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    /* Fallback для CSS переменных */
    color: #ffffff;
    color: var(--color-text-primary, #ffffff);
    font-size: 16px;
    font-size: var(--text-base, 16px);
    line-height: 1.5;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-secondary, rgba(255, 255, 255, 0.7));
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    min-width: 32px; /* Touch target */
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color var(--duration-fast, 0.2s) ease;
    border-radius: 4px;
}

.toast-close:hover {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.toast-close:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Типы toast */
.toast-success {
    border-left: 4px solid var(--color-primary);
}

.toast-error {
    border-left: 4px solid #ff4444;
}

.toast-warning {
    border-left: 4px solid var(--color-accent);
}

.toast-info {
    border-left: 4px solid #4da6ff;
}

/* Мобильная адаптация */
@media (max-width: 767px) {
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: calc(100% - 32px);
    }
    
    .toast {
        padding: clamp(0.75rem, 2vw, 1rem);
    }
    
    .toast-message {
        font-size: clamp(0.875rem, 2.5vw, 1rem);
    }
}

