/**
 * Уведомление (showNotif() / #notification) — теперь не Bootstrap-модалка,
 * а простой блок с классом .show, ровно как .min-toast (redesign/v10-cart.css
 * + v10-cart.js). Показ/скрытие через common.min.js (showNotif/hideNotif),
 * без .modal('show'/'hide') — поэтому нет backdrop, нет блокировки скролла
 * body, нет браузерного фокус-контура. Тень/скругление/тайминг — 1 в 1
 * скопированы с .min-toast.
 *
 * Вложенные .modal-dialog/.modal-content (разметка осталась прежней) больше
 * не несут своего оформления — вся "видимая коробка" теперь #notification
 * само по себе, а они — прозрачные технические обёртки без размеров/паддингов.
 */

/* ===== Сам блок — как .min-toast ===== */
#notification.modal.fade {
    position: fixed !important;
    display: block !important;
    top: auto !important;
    bottom: 24px !important;
    left: 50% !important;
    right: auto !important;
    max-width: none !important;
    width: 420px;
    margin: 0;
    background: var(--white) !important;
    border-radius: 26px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
    overflow: hidden;
    opacity: 0;
    transform: translateX(-50%) translateY(120px) !important;
    transition: transform .35s cubic-bezier(.32, .72, 0, 1), opacity .35s !important;
    pointer-events: none !important;
    outline: none !important;
    /* Как у .min-toast (301): ниже нижней таб-панели .mob-fix_menu (530).
       Иначе скрытый тост (display:block + translateY) перехватывает клики
       по меню. Высокий z-index не нужен — тост и панель не пересекаются. */
    z-index: 301;
}

#notification.modal.fade.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
}

/* Пока тост скрыт — ни он, ни потомки не ловят клики.
   .modal-dialog раньше имел pointer-events:auto и пробивал none родителя. */
#notification.modal.fade:not(.show),
#notification.modal.fade:not(.show) * {
    pointer-events: none !important;
}

/* Технические обёртки — без собственного оформления, вся "коробка" теперь
   на #notification. */
#notification .modal-dialog {
    width: auto;
    max-width: none;
    margin: 0;
    transform: none !important;
    transition: none !important;
    background: transparent;
    border: none;
    box-shadow: none !important;
}

#notification .modal-dialog.modal-dialog-centered {
    display: block;
    min-height: 0;
    align-items: initial;
}

#notification .modal-content {
    background: transparent !important;
    opacity: 1 !important;
    color: var(--gray-800) !important;
    padding: 0 !important;
    border: none;
    border-radius: 0;
    box-shadow: none !important;
    overflow: visible;
}

/* ===== Заголовок ===== */
#notification .modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 10px;
    border-bottom: none;
    margin-bottom: 0;
}

#notification .modal-header .modal-title {
    flex: 1;
    text-align: left;
    color: var(--navy) !important;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

#notification button.close {
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-500) !important;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    outline: none !important;
    box-shadow: none !important;
    transition: background-color .15s ease;
}

#notification button.close:hover {
    background: var(--gray-200);
}

/* ===== Текст ===== */
#notification .modal-body,
div#notif-body {
    text-align: left;
    padding: 0 16px 16px;
    font-family: var(--font-roboto);
    font-size: 14px;
    line-height: 1.55;
    color: var(--gray-700);
}

/* ===== Кнопки ===== */
#notification .modal-footer {
    padding: 0 16px 16px;
    margin-top: 0;
    border-top: none;
    display: flex;
    gap: 10px;
}

/* Кнопку "Хорошо" убрали совсем — закрытие только через крестик. */
#notification .modal-footer .btn-default {
    display: none !important;
}

#notification .modal-footer #notif-action.btn-primary {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    background: var(--blue);
    border: none;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
    box-shadow: none !important;
    transition: background-color .15s ease;
}

#notification .modal-footer #notif-action.btn-primary:hover {
    background: var(--navy);
    color: var(--white);
}

/* Без кнопки-действия футер целиком не нужен — остаётся только крестик. */
#notification.modal-no-href .modal-footer {
    display: none;
}

/* Тот же уровень, что и у .min-toast на мобильных (redesign/v10-cart.css) —
   чтобы не наезжать на нижнюю таб-панель (.mob-fix_menu, высота 68px). */
@media (max-width: 768px) {
    #notification.modal.fade {
        bottom: 84px !important;
    }
}

@media (max-width: 480px) {
    #notification.modal.fade {
        width: calc(100vw - 24px);
    }
}
