/* ========================================
   Toast-уведомления (замена стандартного alert)
   ======================================== */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: fit-content;
    max-width: 400px;
}

.toast {
    background: #fff;
    color: #333;
    font-family: sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    animation: toastSlideIn 0.4s ease forwards;
}

/* Цветовые варианты */
.toast--success { background: #28a745; color: #fff; }
.toast--error   { background: #dc3545; color: #fff; }
.toast--info    { background: #17a2b8; color: #fff; }

/* Иконки FontAwesome */
.toast i {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 18px;
    flex-shrink: 0;
}

/* Плавное скрытие (добавляется через JS через 4 секунды) */
.toast--hide {
    animation: toastFadeOut 0.4s ease forwards;
}

@keyframes toastSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ========================================
   Модальное окно подтверждения (showConfirm)
   ======================================== */

#confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    opacity: 0;
    animation: confirmFadeIn 0.3s ease forwards;
}

#confirm-modal {
    background: #fff;
    color: #333;
    font-family: sans-serif;
    font-size: 14px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    padding: 24px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    opacity: 0;
    transform: scale(0.9);
    animation: confirmSlideIn 0.3s ease forwards;
}

.confirm-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #222;
}

.confirm-message {
    font-size: 14px;
    margin: 0 0 22px 0;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-btn {
    flex: 0 0 auto;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, filter 0.2s;
}

.confirm-btn:hover {
    opacity: 0.9;
}

.confirm-btn:active {
    transform: scale(0.98);
}

.confirm-btn-cancel {
    background: #6c757d;
    color: #fff;
}

.confirm-btn-cancel:hover {
    background: #5a6268;
}

.confirm-btn-ok {
    background: #28a745;
    color: #fff;
}

.confirm-btn-ok.confirm-btn-ok--red {
    background: #dc3545;
}

.confirm-btn-ok.confirm-btn-ok--red:hover {
    background: #c82333;
}

@keyframes confirmFadeIn {
    to { opacity: 1; }
}

@keyframes confirmSlideIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}