

/* ===== Modal Overlay ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px); /* ← add this */
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.modal.open {
  display: flex;
}

/* ===== Modal Content Box ===== */
.modal-content {
  background: #fff;

  /* Smaller, cleaner modal sizing */
  width: 70%;       /* base width */
  max-width: 48%;   /* tighter on large screens */

  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: fadeIn 220ms ease;
}

/* Title */
.modal-content h2 {
  text-align: center;
  width: 100%;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.3;
}


/* ===== Internal Scroll (Text Area) ===== */
.modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 6.5rem);
  padding-right: 0.75rem;
  line-height: 1.65;
}

/* Smooth custom scrollbar */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 6px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* ===== Close Button ===== */
.modal .close {
  position: absolute;
  top: 12px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #444;
  transition: color 0.2s ease;
}

.modal .close:hover {
  color: #000;
}

/* ===== Headings & Text ===== */
.modal-body h3 {
  margin-top: 1.2rem;
  margin-bottom: 0.45rem;
  color: #2563eb; /* nice blue accent */
  font-size: 1.15rem;
}

.modal-body p,
.modal-body ul,
.modal-body ol {
  margin-bottom: 0.9rem;
  font-size: 0.97rem;
  color: #333;
}

/* List styling */
.modal-body ul {
  list-style: disc inside;
  margin-left: 0.5rem;
}

/* ===== Fade Animation ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
