/**
 * Стили для toast-уведомлений (dreamy notifications)
 * Красивые современные уведомления вместо стандартных alert
 */

/* Контейнер для уведомлений */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
}

/* Базовые стили уведомления */
.toast {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
    opacity: 0.3;
}

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

.toast-hide {
    opacity: 0;
    transform: translateX(400px);
}

/* Контент уведомления */
.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

/* Иконка */
.toast-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* Сообщение */
.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3e50;
    font-weight: 500;
}

/* Кнопка закрытия */
.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #2c3e50;
}

/* Типы уведомлений */
.toast-success {
    border-left-color: #27ae60;
    color: #27ae60;
}

.toast-success .toast-icon {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.toast-error {
    border-left-color: #e74c3c;
    color: #e74c3c;
}

.toast-error .toast-icon {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.toast-warning {
    border-left-color: #f39c12;
    color: #f39c12;
}

.toast-warning .toast-icon {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.toast-info {
    border-left-color: #3498db;
    color: #3498db;
}

.toast-info .toast-icon {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

/* Модальное окно для confirm */
.toast-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.toast-confirm-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-confirm-message {
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 500;
}

.toast-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.toast-confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.toast-confirm-yes {
    background: #3498db;
    color: #ffffff;
}

.toast-confirm-yes:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.toast-confirm-no {
    background: #ecf0f1;
    color: #2c3e50;
}

.toast-confirm-no:hover {
    background: #bdc3c7;
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .toast-confirm-content {
        max-width: none;
        margin: 20px;
    }
}

