/* ---------- Затемнение (overlay) ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  /* скрыт по умолчанию */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

/* overlay активен — показываем */
.modal-overlay.active {
  display: flex;
}

/* ---------- Само модальное окно ---------- */
.modal {
  background: #ffffff;
  max-width: 475px;
  width: 100%;
  padding: 16px 15px 16px;
  transform: scale(0.92);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  opacity: 0;
  position: relative;
  background: #ffffff;
  border-radius: 5px;
  border: 2px solid #b7e09f;
  outline: none;
}

/* когда overlay активен — окно появляется */
.modal-overlay.active .modal {
  opacity: 1;
}

/* ---------- Заголовок ---------- */
.modal-title {
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 100%;
  /* or 16px */

  color: #000000;

  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- Кнопка закрытия (крестик) ---------- */
.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  transition:
    color 0.2s,
    transform 0.2s;
  padding: 0 4px;
}

.close-btn:hover {
  color: #e74c3c;
  transform: rotate(90deg);
}

/* ---------- Текст ---------- */
.modal-body {
  font-size: 16px;
  line-height: 1.6;
  color: #2d2d44;
  margin: 8px 0 22px;
}

.modal-body p {
  margin-bottom: 10px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

/* ---------- Кнопки в футере ---------- */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}

.modal-footer button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}

.btn-secondary {
  background: #e9ecf3;
  color: #2d2d44;
}

.btn-secondary:hover {
  background: #d5dae6;
}

.btn-primary {
  background: #6cb043;
  color: #fff;
}

.btn-primary:hover {
  background: #6cb043;
}

/* ---------- Анимация появления overlay ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- Адаптив ---------- */
@media (max-width: 480px) {
  .modal {
    padding: 16px 16px 16px;
  }
  .modal-title {
    font-size: 20px;
  }
  .modal-footer {
    flex-direction: column;
    width: 100%;
    margin-left: 90%;
  }
  .modal-footer button {
    text-align: center;
  }
}

.modal_button_close {
  background: #6cb043;
  border: 1px solid #6cb043;
  border-radius: 5px;
  transform: rotate(180deg);
}

.modal_timework_text p {
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  line-height: 137%;

  color: #000000;
}

.modal_timework_text .modal_green_text {
  color: #6cb043;
}
