/* Modal for the sizes table */

#modalOpener {
    margin-bottom: 1em;
    cursor: pointer;
    text-decoration: underline;
    width: fit-content;
    margin-top: 1rem;
}

.modalWindow {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1020;
  display: none;                 
  place-items: center;  
}

/* Modal panel is a column; header sticks; body scrolls */
.modal-contents {
  background: #fff;
  width: min(92vw, 720px);
  max-height: 85vh;              /* fit on screen */
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  overflow: hidden;              /* panel itself doesn't scroll */
  display: flex;
  flex-direction: column;
}

/* Sticky header keeps the X visible while content scrolls */
.modalHeader {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 12px;
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.closeModal {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 6px 10px;
}

/* Only this area scrolls */
.modalBody {
  flex: 1 1 auto;
  overflow: auto;                /* scrolling happens here */
  padding: 16px;
}