/* toast-notifications.css - Стилі для спливаючих повідомлень */

/* =================================================================== */
/* TOAST CONTAINER - СПРАВА ВНИЗУ */
/* =================================================================== */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    max-width: 380px;
}

/* =================================================================== */
/* ОСНОВНІ СТИЛІ TOAST ПОВІДОМЛЕНЬ */
/* =================================================================== */

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-left: 5px solid #4CAF50;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(420px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: auto;
    position: relative;
    min-height: 65px;
    max-width: 100%;
    word-wrap: break-word;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* =================================================================== */
/* ТИПИ TOAST ПОВІДОМЛЕНЬ */
/* =================================================================== */

.toast.success {
    border-left-color: #4CAF50;
}

.toast.error {
    border-left-color: #f44336;
}

.toast.warning {
    border-left-color: #ff9800;
}

.toast.info {
    border-left-color: #2196F3;
}

/* =================================================================== */
/* ІКОНКИ TOAST ПОВІДОМЛЕНЬ */
/* =================================================================== */

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.toast.success .toast-icon {
    background: #4CAF50;
}

.toast.error .toast-icon {
    background: #f44336;
}

.toast.warning .toast-icon {
    background: #ff9800;
}

.toast.info .toast-icon {
    background: #2196F3;
}

/* =================================================================== */
/* КОНТЕНТ TOAST ПОВІДОМЛЕНЬ */
/* =================================================================== */

.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.toast-message {
    color: #666;
    white-space: pre-line; /* Для підтримки \n переносів */
}

/* =================================================================== */
/* КНОПКА ЗАКРИТТЯ */
/* =================================================================== */

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #666;
}

/* =================================================================== */
/* ПРОГРЕС БАР */
/* =================================================================== */

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 8px 8px;
    transition: width linear;
}

.toast.success .toast-progress {
    background: #4CAF50;
}

.toast.error .toast-progress {
    background: #f44336;
}

.toast.warning .toast-progress {
    background: #ff9800;
}

.toast.info .toast-progress {
    background: #2196F3;
}

/* =================================================================== */
/* АНІМАЦІЯ ПРОГРЕС БАРУ */
/* =================================================================== */

@keyframes toastProgress {
    from { 
        width: 100%; 
    }
    to { 
        width: 0%; 
    }
}

/* =================================================================== */
/* МОБІЛЬНІ СТИЛІ */
/* =================================================================== */

@media (max-width: 768px) {
    .toast-container {
        bottom: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
    }

    .toast {
        transform: translateY(100px);
        margin-bottom: 10px;
        padding: 14px 18px;
        min-height: 60px;
    }

    .toast.show {
        transform: translateY(0);
    }

    .toast-content {
        font-size: 13px;
    }

    .toast-title {
        font-size: 13px;
    }

    .toast-message {
        font-size: 12px;
    }

    .toast-icon {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .toast-close {
        width: 20px;
        height: 20px;
        font-size: 14px;
        top: 6px;
        right: 6px;
    }
}

/* =================================================================== */
/* СТИЛІ ДЛЯ ДУЖЕ МАЛЕНЬКИХ ЕКРАНІВ */
/* =================================================================== */

@media (max-width: 480px) {
    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        padding: 12px 16px;
        margin-bottom: 8px;
        min-height: 55px;
    }

    .toast-content {
        font-size: 12px;
    }

    .toast-title {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .toast-message {
        font-size: 11px;
    }

    .toast-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .toast-close {
        width: 18px;
        height: 18px;
        font-size: 12px;
    }
}