/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px; /* prevents edge cut on small screens */

  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 9999;
}

/* ACTIVE STATE */
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== MODAL BOX ===== */
.modal-box {
  background: #111;
  color: #fff;
  border-radius: 16px;

  width: 100%;
  max-width: 600px;

  padding: 30px;
  position: relative;

  box-shadow: 0 10px 40px rgba(0,0,0,0.4);

  transform: scale(0.9);
  transition: 0.3s ease;
}

/* ANIMATION */
.modal-overlay.active .modal-box {
  transform: scale(1);
}

/* ===== CLOSE BUTTON ===== */
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;

  font-size: 24px;
  cursor: pointer;
  color: #ff4d4f;
}

/* ===== CONTENT ===== */
.modal-box h2 {
  font-size: 26px;
  margin-bottom: 15px;
}

.modal-box p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #ccc;
}

.modal-box ul {
  padding-left: 20px;
}

.modal-box ul li {
  margin-bottom: 8px;
  font-size: 14px;
}

/* ===== SCROLL FIX FOR SMALL HEIGHT ===== */
.modal-box {
  max-height: 90vh;
  overflow-y: auto;
}

/* ========================= */
/* 📱 TABLET (≤ 992px) */
/* ========================= */
@media (max-width: 992px) {

  .modal-box {
    max-width: 500px;
    padding: 25px;
  }

  .modal-box h2 {
    font-size: 22px;
  }

  .modal-box p {
    font-size: 14px;
  }
}

/* ========================= */
/* 📱 MOBILE (≤ 576px) */
/* ========================= */
@media (max-width: 576px) {

  .modal-overlay {
    align-items: flex-end; /* slide from bottom feel */
  }

  .modal-box {
    width: 100%;
    max-width: 100%;

    border-radius: 16px 16px 0 0;
    padding: 20px;

    transform: translateY(100%);
  }

  .modal-overlay.active .modal-box {
    transform: translateY(0);
  }

  .modal-close {
    top: 10px;
    right: 15px;
    font-size: 20px;
  }

  .modal-box h2 {
    font-size: 20px;
  }

  .modal-box p,
  .modal-box ul li {
    font-size: 13px;
  }
}