html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  height: 100%;
  overflow: hidden;
  user-select: none;
}

.sticky-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: #333;
  color: white;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.title {
  font-size: 1.2em;
  white-space: nowrap;
}

.center-text {
  font-size: 1em;
  white-space: nowrap;
}

.run-button {
  padding: 6px 12px;
  font-size: 1em;
  cursor: pointer;
}

.run-button.selected-radio {
  background: #1e90ff;
  color: #fff;
  border: 2px solid #1e90ff;
  box-shadow: 0 2px 8px rgba(30,144,255,0.08);
  border-radius: 6px; /* Ensure rounded corners remain */
}

.run-button.selected-radio:hover {
  background: #187bcd;
  border-color: #187bcd;
}

.table-container {
  height: calc(100vh - 50px);
  box-sizing: border-box;
}

[data-simplebar] {
  max-height: 100%;
  max-width: 100%;
}

table {
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  table-layout: fixed;
}

td {
  padding: 8px 12px;
  border: 1px solid #ccc;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

td, .question-cell, .questions-table-extra-cell {
  height: 32px !important;
  vertical-align: middle !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

.question-cell {
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
  min-width: 36px;
  max-width: 48px;
  width: 50px;
  padding-left: 0;
  padding-right: 0;
}

.question-cell.selected {
  background-color: #28a745 !important;
  color: white;
}

/* Style for extra blank cells in the questions table to match question cells */
.questions-table-extra-cell {
  min-width: 36px;
  max-width: 48px;
  width: 50px;
  height: 40px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.simplebar-scrollbar::before {
  background-color: #888;
  border-radius: 10px;
}

.simplebar-track.simplebar-vertical {
  width: 50px !important;
}

.simplebar-track.simplebar-horizontal {
  height: 50px !important;
}

.simplebar-track,
.simplebar-scrollbar,
.simplebar-scrollbar::before {
  cursor: default !important;
  user-select: none !important;
  pointer-events: auto;
}

td.sticky-col {
  position: sticky;
  left: 0;
  background: #111;
  color: #fff;
  z-index: 2;
  font-weight: bold;
  border-left: none;
  border-top: none;
  box-shadow: 1px 0 0 #ccc;
  cursor: pointer;
}

.sticky-content {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.header-right {
  text-align: right;
  min-width: 200px;
}

.sticky-header-relative {
  position: relative;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #fff;
  padding: 24px 32px;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal button {
  margin: 0 12px;
}

/* Modern styling for estimate results table and popup */
.estimate-table {
  margin: 1.5em auto;
  border-collapse: collapse;
  border-spacing: 0;
  width: 600px;
  min-width: 400px;
  max-width: 98vw;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  font-size: 1.08em;
  table-layout: fixed;
  border: 2px solid #222;
  text-align: center;
}
.estimate-table th, .estimate-table td {
  padding: 12px 10px;
  border: 2px solid #222;
  text-align: center;
}
.estimate-table th {
  background: #f7f7fa;
  color: #333;
  font-weight: 400;
  letter-spacing: 0.03em;
}
.estimate-table td {
  background: #fcfcff;
  color: #222;
  font-weight: 700;
  transition: background 0.2s;
}

/* Make the final row of the estimate table not bold */
.estimate-table tr:last-child td {
  font-weight: 400;
}

.estimate-table, .estimate-table th, .estimate-table td {
  user-select: text !important;
}

/* Popup modal fixed width */
#estimateResultModal .modal-box {
  min-width: 640px;
  max-width: 99vw;
  width: 640px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* #estimateResultContent {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
} */
.estimate-table {
  margin-left: auto;
  margin-right: auto;
}

/* @media (max-width: 700px) {
  .estimate-table, #estimateResultModal .modal-box {
    min-width: 0;
    width: 98vw;
    font-size: 0.98em;
  }
} */

/* Toast notification styling */
#estimate-toast {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 1.08em;
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  transition: opacity 0.3s, top 0.3s;
}
#estimate-toast.show {
  opacity: 1;
  top: 48px;
  pointer-events: auto;
}

@media (max-width: 1100px) {
  .header-center > #save-list-btn,
  .header-center > #open-list-btn,
  .header-center > #clear-all-btn {
    display: none !important;
  }
  #options-btn {
    display: inline-block !important;
  }
  .header-center > #foundation-btn,
  .header-center > #higher-btn {
    display: none !important;
  }
}