/* Public site layout and header */
.site-topbar {
  background: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
}

.site-logo {
  height: 40px;
  width: auto;
}

.site-brand-text {
  font-weight: 600;
  color: var(--bs-body-color);
}

.site-nav-link {
  font-weight: 500;
  color: var(--bs-body-color);
  text-decoration: none;
}

.site-nav-link:hover {
  color: #004d80;
}

.site-nav-link.active {
  color: #004d80;
  font-weight: 600;
}

.site-section-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
  width: 100%;
}

.site-sidebar {
  flex: 0 0 35%;
  max-width: 35%;
  background: var(--bs-body-bg);
  border-right: 1px solid var(--bs-border-color);
  padding: 1.25rem 1rem;
}

.site-sidebar-title {
  letter-spacing: 0.04em;
}

.site-main {
  flex: 0 0 65%;
  max-width: 65%;
  overflow: auto;
  padding: 1.5rem;
}

.site-main--full {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem;
}

.introduction-body {
  line-height: 1.6;
}

.introduction-body p:last-child {
  margin-bottom: 0;
}

.site-select-data .form-label {
  font-size: 0.8125rem;
}

.site-select-panel {
  border-top: 1px solid var(--bs-border-color);
  padding-top: 0.75rem;
}

.site-check-list {
  max-height: 14rem;
  overflow-y: auto;
}

.site-check-item {
  padding: 0.15rem 0;
}

.site-questions-list {
  max-height: none;
  overflow-y: visible;
}

.site-question-item {
  border: 0;
  border-bottom: 1px solid var(--bs-border-color-translucent);
  border-radius: 0 !important;
}

.site-question-item:last-child {
  border-bottom: 0;
}

.site-question-toggle {
  color: var(--bs-body-color);
  line-height: 1.35;
  background: transparent;
  box-shadow: none !important;
}

.site-question-toggle:hover,
.site-question-toggle:focus {
  color: #004d80;
}

.site-question-toggle:not(.collapsed) {
  color: #004d80;
  background: transparent;
}

.site-question-label {
  line-height: 1.35;
}

.site-sub-list {
  max-height: none;
  overflow-y: visible;
}

.site-select-all .form-check-input:indeterminate {
  background-color: var(--bs-secondary, #6c757d);
  border-color: var(--bs-secondary, #6c757d);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

.site-select-all .form-check-input:indeterminate:focus {
  box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25);
}

.site-results-page-main {
  padding: 1.5rem 1.25rem 2rem;
  max-width: none;
  font-family: Verdana, Geneva, sans-serif;
}

.site-results-intro {
  color: var(--bs-body-color);
}

.site-results-datatable-wrap {
  --question-col-width: 15rem;
  width: 100%;
  max-height: calc(100vh - 220px);
  overflow: auto;
  position: relative;
  background-color: #fff;
  container-type: inline-size;
}

.site-results-datatable-wrap .dt-container {
  width: max-content;
  max-width: none;
}

.site-results-datatable-wrap .dt-search,
.site-results-datatable-wrap .dt-length,
.site-results-datatable-wrap .dt-info,
.site-results-datatable-wrap .dt-paging {
  display: none;
}

.site-results-datatable-wrap .dt-layout-full {
  display: block;
  overflow: visible;
}

.site-results-datatable-wrap .site-results-datatable {
  width: calc(var(--question-col-width) + var(--country-count, 1) * 35cqi);
  max-width: none;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.site-results-datatable-wrap .site-results-datatable thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background-color: #fff;
  box-shadow: inset 0 -1px 0 var(--bs-border-color, #dee2e6);
}

.site-results-datatable-wrap .site-results-datatable th.site-results-table__question-col,
.site-results-datatable-wrap .site-results-datatable td.site-results-table__question-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: var(--question-col-width);
  width: var(--question-col-width);
  background-color: #fff;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.08);
}

.site-results-datatable-wrap .site-results-datatable > thead > tr > th:not(.site-results-table__question-col),
.site-results-datatable-wrap .site-results-datatable > tbody > tr > td:not(.site-results-table__question-col),
.site-results-datatable-wrap .site-results-datatable > tbody > tr > th:not(.site-results-table__question-col) {
  min-width: 35cqi;
  width: 35cqi;
}

.site-results-datatable-wrap .site-results-datatable thead th.site-results-table__question-col {
  z-index: 4;
}

.site-results-datatable-wrap .site-results-datatable tbody tr:nth-of-type(odd) > td.site-results-table__question-col {
  background-color: #f2f2f2;
}

.site-results-datatable-wrap .site-results-datatable .site-results-section-row td.site-results-table__question-col,
.site-results-datatable-wrap .site-results-datatable .site-results-comment-row td.site-results-table__question-col {
  background-color: #f8f9fa;
}

.site-results-table {
  font-family: Verdana, Geneva, sans-serif;
  width: auto;
  max-width: 100%;
}

.site-results-table th,
.site-results-table td {
  vertical-align: top;
  font-size: 0.8125rem;
  padding: 8px;
}

.site-results-table__question-col {
  padding-left: 24px;
  min-width: 14rem;
}

.site-results-section-row:not(:first-child) td {
  border-top-width: 2px;
}

.site-results-section-title {
  font-weight: 600;
  background-color: var(--bs-tertiary-bg, #f8f9fa);
}

.site-results-section-spacer {
  background-color: var(--bs-tertiary-bg, #f8f9fa);
}

.site-results-question-label {
  font-weight: 400;
  padding-left: 2rem;
}

.site-results-comment-row td {
  background-color: var(--bs-tertiary-bg, #f8f9fa);
}

.site-results-comment-label {
  font-weight: 400;
  font-style: italic;
  padding-left: 2.5rem;
}

.site-result-comment-value {
  white-space: pre-wrap;
}

.site-result-comment-value.introduction-body {
  white-space: normal;
}

.site-result-cell--comment {
  text-align: left;
}

.site-comment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 1.75rem;
  padding: 0.15rem 0.5rem;
  line-height: 1;
  border: 0;
  border-radius: 0.35rem;
  background-color: #5c6b73;
  color: #fff;
}

.site-comment-btn:hover,
.site-comment-btn:focus {
  background-color: #4a575d;
  color: #fff;
}

.site-comment-btn.is-open {
  background-color: #3d484d;
}

.site-comment-btn__dots {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.site-comment-panel {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.35rem;
  background-color: var(--bs-tertiary-bg, #f8f9fa);
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.site-comment-panel p:last-child {
  margin-bottom: 0;
}

.introduction-body a {
  word-break: break-word;
}

.site-results-table > thead > tr > th:not(.site-results-table__question-col),
.site-results-table > tbody > tr > td:not(.site-results-table__question-col) {
  min-width: 7rem;
}

.site-results-table thead th {
  white-space: nowrap;
}

.site-result-cell {
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.site-result-cell--table {
  min-width: 12rem;
}

.site-result-cell--table:has(.site-result-nested-table--vertical) {
  min-width: 0;
  max-width: 100%;
}

.site-result-nested-table {
  width: auto;
  max-width: none;
  font-size: 0.75rem;
  background: var(--bs-body-bg);
}

.site-result-nested-table th,
.site-result-nested-table td {
  padding: 5px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.site-result-nested-table th {
  font-weight: 600;
}

.site-result-nested-table--vertical {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

.site-result-nested-table--vertical th[scope="row"] {
  width: 36%;
  max-width: 36%;
  white-space: normal;
  background: var(--bs-tertiary-bg, #f8f9fa);
}

.site-result-nested-table--vertical td {
  width: 64%;
}

.site-result-value {
  margin-bottom: 0.15rem;
}

.site-result-value.introduction-body p {
  margin-bottom: 0.5rem;
}

.site-result-value.introduction-body ul,
.site-result-value.introduction-body ol {
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
}

.site-view-map-link {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #004d80;
  text-decoration: none;
  white-space: nowrap;
}

.site-view-map-link:hover,
.site-view-map-link:focus {
  color: #003a61;
  text-decoration: underline;
}

.site-map-totals {
  line-height: 1.4;
  padding: 0rem 1rem 1rem 1rem;
  background-color: #333;
  color: #ffffff;
  margin-bottom: 0;
}

/* Map modal — matches ELM4 browse / elm3 v2 jQuery UI dialog + #res legend */
.site-map-modal-dialog {
  width: 600px;
  max-width: 600px;
}

.site-map-modal .modal-content,
.site-map-modal .modal-header {
  border-radius: 0;
}

.site-map-modal .modal-header {
  background-color: #333;
  color: #fff;
  border-bottom: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.site-map-modal .modal-title {
  font-weight: normal;
  font-size: 0.9375rem;
  line-height: 1.35;
  white-space: normal;
}

.site-map-modal-body {
  padding: 0;
}

.site-vmap-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0;
  line-height: 0;
}

.site-vmap {
  width: 100%;
  aspect-ratio: 680 / 520;
  height: auto;
  overflow: hidden;
}

.site-vmap svg {
  display: block;
}

.site-map-res {
  margin: 2px 5px 0 0;
  display: block;
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 2;
  pointer-events: none;
}

.site-map-res label {
  margin: 0 2px 0 0;
  padding: 0 5px;
  width: 30px;
  height: 30px;
  line-height: 30px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  display: block;
  float: left;
  font-size: 0.75rem;
}

.site-map-res .c00,
.site-map-res .c25,
.site-map-res .c50,
.site-map-res .c75,
.site-map-res .c100 {
  display: block;
  width: 100px;
  padding: 15px;
  font-size: 0.75rem;
  clear: both;
}

.site-map-res span.c00 {
  background: #dddddd;
}

.site-map-res span.c25 {
  background: #afeeee;
}

.site-map-res span.c50 {
  background: #48d1cc;
}

.site-map-res span.c75 {
  background: #008080;
  color: #ddd;
}

.site-map-res span.c100 {
  background: #2f4f4f;
  color: #ddd;
}

.site-map-res label#yes {
  background-color: #2a4480;
}

.site-map-res label#no {
  background-color: #ff9200;
}

.site-map-res label#na {
  background-color: #aaa;
}

.site-vmap .jqvmap-label {
  z-index: 3;
}

@media (max-width: 767.98px) {
  .site-results-table__question-col {
    min-width: 10rem;
  }

  .site-results-datatable-wrap {
    --question-col-width: 10rem;
    overflow: scroll;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #8a8a8a #e9ecef;
  }

  .site-results-datatable-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  .site-results-datatable-wrap::-webkit-scrollbar-track {
    background: #e9ecef;
  }

  .site-results-datatable-wrap::-webkit-scrollbar-thumb {
    background: #8a8a8a;
    border-radius: 4px;
  }
}

@media (max-width: 991.98px) {
  .site-section-wrapper {
    flex-direction: column;
  }

  .site-sidebar,
  .site-main {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .site-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--bs-border-color);
  }
}
