/* ======== Overlay для предупреждений ======== */
.alert-modal__overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 10000001 !important;
  display: none;
}

/* ======== Само окно (базовый вид — как сейчас, для десктопов) ======== */
.alert-modal{
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  color: #0b1f35;
  z-index: 10000002 !important;
  display: none;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  font-family: "Times New Roman", serif;
}

/* Заголовок */
.alert-modal__header{
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Текст */
.alert-modal__body{
  padding: 14px 18px 20px;
  font-size: 15px;
  line-height: 1.45;
  color:#333;
}

/* Кнопка закрытия */
.alert-modal__close{
  position: absolute;
  right: 14px; top: 14px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  color: #666;
}
.alert-modal__close:hover{ color:#000; }

/* =========================================================
   АДАПТИВ ПО ДИАПАЗОНАМ
   ========================================================= */

/* 0–382px — очень узкие экраны: окно чуть компактнее */
@media (max-width: 382px){
  .alert-modal{
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    border-radius: 16px;
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
  .alert-modal__header{
    padding: 14px 16px;
    font-size: 17px;
  }
  .alert-modal__body{
    padding: 12px 16px 18px;
    font-size: 14px;
  }
}

/* 383–410px — компактные телефоны */
@media (min-width: 383px) and (max-width: 410px){
  .alert-modal{
    width: min(440px, calc(100vw - 26px));
    max-height: calc(100vh - 28px);
    border-radius: 16px;
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
  .alert-modal__header{
    padding: 14px 16px;
    font-size: 17px;
  }
  .alert-modal__body{
    padding: 12px 16px 18px;
    font-size: 14px;
  }
}

/* 411–766px — ОСТАВЛЯЕМ КАК ЕСТЬ (здесь сейчас красиво) */
@media (min-width: 411px) and (max-width: 766px){
  .alert-modal{
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
}

/* 767–980px — планшеты / мелкие ноутбуки */
@media (min-width: 767px) and (max-width: 980px){
  .alert-modal{
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
}

/* 981–1278px — стандартные ноутбуки */
@media (min-width: 981px) and (max-width: 1278px){
  .alert-modal{
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
}

/* 1279–1332px */
@media (min-width: 1279px) and (max-width: 1332px){
  .alert-modal{
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
}

/* 1333–1438px */
@media (min-width: 1333px) and (max-width: 1438px){
  .alert-modal{
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
}

/* 1439–1678px — нормальные десктопы */
@media (min-width: 1439px) and (max-width: 1678px){
  .alert-modal{
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
}

/* 1679–1918px — крупные мониторы */
@media (min-width: 1679px) and (max-width: 1918px){
  .alert-modal{
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
}

/* ≥1919px — ОСТАВЛЯЕМ КАК ЕСТЬ (как сейчас красиво) */
@media (min-width: 1919px){
  .alert-modal{
    z-index: 10000002 !important;
  }
  .alert-modal__overlay{
    z-index: 10000001 !important;
  }
}
