@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@500&display=swap");

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "EB Garamond", serif;
}

body {
  background-color: #f4f0eb;
  line-height: 1.6;
  font-size: 1rem;
}

/* Main content container */
#content {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Section block */
.table-section {
  background-color: #fff;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
.table-section::-webkit-scrollbar {
  height: 6px;
}
.table-section::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

/* Section title */
.table-section h2 {
  background-color: #34495e;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  min-width: 600px;
}
th, td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: center;
  font-size: 1rem;
  word-break: break-word;
}
th {
  background-color: #2c3e50;
  color: #fff;
}

/* View buttons */
.view-btn, .view-multi-btn {
  width: 100px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  margin: 0.3rem 0.3rem 0.3rem 0;
  border-radius: 4px;
  color: white;
  font-size: 0.9rem;
  background-color: #27ae60;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.view-btn:hover, .view-multi-btn:hover {
  background-color: #1e8449;
  box-shadow: 0 0 6px rgba(39, 174, 96, 0.4);
}
.view-btn:active, .view-multi-btn:active {
  background-color: #145a32;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}
.modal-content {
  background-color: #fff;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.modal-content h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
#docList {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
#docList li {
  margin-bottom: 0.5rem;
}
#docList a {
  color: #2c3e50;
  text-decoration: underline;
  font-size: 0.95rem;
}
.close-btn {
  background-color: #34495e;
  color: white;
  border: none;
  padding: 0.625rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}
.close-btn:hover {
  background-color: #2c3e50;
}

/* --------------------
   Responsive Breakpoints
--------------------- */

/* Tablets (below 992px) */
@media (max-width: 991px) {
  html {
    font-size: 95%;
  }
  .table-section h2 {
    font-size: 1.3rem;
  }
  th, td {
    font-size: 0.95rem;
  }
  .view-btn, .view-multi-btn {
    font-size: 0.85rem;
  }
}

/* Phones (below 600px) */
@media (max-width: 599px) {
  html {
    font-size: 100%; /* Lock base font size */
  }

  #content {
    padding: 10px;
  }

  .table-section {
    padding: 12px;
  }

  .table-section h2 {
    font-size: 18px;
  }

  table {
    font-size: 14px; /* ✅ Enforce fixed font size for tables */
  }

  th, td {
    font-size: 14px;  /* ✅ Keep all table cell font sizes uniform */
    padding: 8px;
  }

  .view-btn,
  .view-multi-btn {
    width: 90px;
    height: 34px;
    font-size: 13px;
  }

  .modal-content {
    width: 95%;
    padding: 15px 20px;
  }

  .modal-content h3 {
    font-size: 16px;
  }

  #docList a {
    font-size: 13px;
  }

  .close-btn {
    font-size: 13px;
    padding: 10px 14px;
  }
}
