/* ===============================
   Окно "Оповещения" — _alerts_modal.html
=============================== */

#alerts-modal.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  backdrop-filter: blur(3px);
}

#alerts-modal.hidden {
  display: none;
}

/* === Контейнер окна === */
#alerts-modal .modal-window {
  background: #181c24;
  border: 1px solid #00e89640;
  border-radius: 12px;
  width: clamp(320px, 42vw, 680px); /* ✅ динамическая ширина */
  max-height: 80vh;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: both;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

/* === Заголовок === */
#alerts-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1c212b;
  border-bottom: 1px solid #00e89630;
  padding: 14px 20px;              /* ✅ симметрия */
}

#alerts-modal .modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #00e896;
}

#alerts-modal .modal-close {
  background: none;
  border: none;
  color: #bbb;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s ease;
}

#alerts-modal .modal-close:hover {
  color: #fff;
}

#alerts-modal .modal-content {
  width: 90%;
  margin: 5px auto;           /* ✅ отступ сверху и снизу по 3px, центрирование по горизонтали */
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  max-height: calc(80vh - 70px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #1b202c;
  border-radius: 10px;
}

/* === Элемент списка === */
.alert-item {
  background: #1f2430;
  border: 1px solid #00e89625;
  border-radius: 10px;
  padding: 10px 14px;              /* ✅ равные внутренние отступы */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  transition: background 0.2s ease;
}

.alert-item:hover {
  background: #232836;
}

/* === Верхняя строка === */
.alert-item .alert-main {
  display: flex;
  justify-content: space-between;  /* ✅ равномерно */
  align-items: center;
  width: 100%;
}

/* === Текст и элементы === */
.alert-item .alert-symbol {
  color: #00e896;
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
}

.alert-item .alert-symbol:hover {
  text-decoration: underline;
}

.alert-item .alert-text {
  color: #d0d4dc;
  text-align: center;
  flex-grow: 1;
}

.alert-item .alert-remove {
  background: none;
  border: none;
  color: #ff4f6d;
  cursor: pointer;
  font-size: 15px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.alert-item .alert-remove:hover {
  color: #ff8095;
}

/* === Нижняя строка (статус) === */
.alert-status {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.alert-status.active {
  color: #00e896;
}

.alert-status.triggered {
  color: #ffb347;
}
/* ===============================
   Notifications Modal
   =============================== */

#notifications-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    z-index: 2000;
}

#notifications-modal.hidden {
    display: none;
}

#notifications-modal .modal-content {
    background: #141922;
    border: 1px solid #1f232b;
    width: 420px;
    padding: 20px;
    border-radius: 10px;
    margin: 120px auto 0 auto;
    color: #e6e6e6;
    position: relative;
}

#notifications-modal .modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #00e896;
}

/* кнопка ✖ */
#notifications-modal .modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    color: #aaa;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 3px;
    transition: 0.2s;
}

#notifications-modal .modal-close:hover {
    color: #fff;
}
/* Кнопка без заливки, только зелёная обводка */
.notify-outline-btn {
    background: transparent;
    color: #00e896;
    border: 1px solid #00e896;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.notify-outline-btn:hover {
    background: rgba(0, 232, 150, 0.12);
}
/* ===============================
   Notifications — список
   =============================== */

.notify-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.notify-item {
    background: #10141a;
    border: 1px solid #1f232b;
    padding: 12px 14px;
    border-radius: 8px;
}

.notify-title {
    font-size: 15px;
    font-weight: 600;
    color: #00e896;
    margin-bottom: 6px;
}

.notify-text {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 6px;
}

.notify-date {
    font-size: 11px;
    color: #777;
    text-align: right;
}
