/*
======================================================================
 PEA-CMS (Initials: Edgar A P)
======================================================================
 File:       Modules/System/assets/css/toast.css
 Purpose:    Стили всплывающих уведомлений (toast) — базовый шаблон.
             Поддерживает обе цветовые схемы сайта через переменные
             темы (--surface, --text, --border, --shadow и т.д. из
             app.css :root[data-theme="light"|"dark"]).
             Тема может переопределять через Templates/default/.
======================================================================
*/

.toast-container {
    position: fixed;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 320px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.toast-container.toast--top-right { top: 16px; right: 16px; }
.toast-container.toast--top-left { top: 16px; left: 16px; }
.toast-container.toast--top-center { top: 16px; left: 50%; transform: translateX(-50%); }
.toast-container.toast--bottom-right { bottom: 16px; right: 16px; }
.toast-container.toast--bottom-left { bottom: 16px; left: 16px; }

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #d8dee6);
    box-shadow: var(--shadow, 0 12px 35px rgb(15 23 42 / 7%));
    pointer-events: auto;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text, #1f2933);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast--info { border-left: 4px solid var(--primary, #2563eb); }
.toast--success { border-left: 4px solid var(--success-text, #047857); }
.toast--warning { border-left: 4px solid #d97706; }
.toast--error { border-left: 4px solid var(--danger-text, #be123c); }

.toast--success {
    background: var(--success-bg, var(--surface, #ffffff));
}
.toast--error {
    background: var(--danger-bg, var(--surface, #ffffff));
}

.toast__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast__title {
    font-weight: 600;
    color: var(--text, #1f2933);
}

.toast__message {
    color: var(--text-soft, #4b5563);
}

.toast__close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text-faint, #6b7280);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.toast__close:hover {
    background: var(--surface-hover, #f1f4f8);
    color: var(--text, #1f2933);
}

.toast--out {
    opacity: 0;
    transform: translateY(-6px);
}
