html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

#nt-map-wrapper {
  margin-top: 0;
  padding-top: 0;
}

.swm-container:has(#nt-map-wrapper) {
  max-width: none;
  width: 100%;
}

.nt-dashboard {
  width: 100%;
  max-width: none;

  box-sizing: border-box;

  font-family: Arial, sans-serif;
}

.nt-dashboard-header {
  padding: 15px 20px;

  border-bottom: 1px solid #ddd;

  background: #fff;
}

.nt-dashboard-header h2 {
  margin: 0;

  font-size: 22px;
  line-height: 1.3;
}

.nt-dashboard-body {
  display: grid;

  grid-template-columns: 240px minmax(0, 1fr);

  width: 100%;

  min-height: 700px;
}

.nt-dashboard-sidebar {
  width: 100%;

  padding: 20px 15px;

  background: #fff;

  border-right: 1px solid #ddd;

  box-sizing: border-box;

  overflow-y: auto;
}

.nt-dashboard-map {
  position: relative;

  min-width: 0;
  min-height: 700px;

  overflow: hidden;
}

.nt-dashboard-section {
  padding: 0 0 1em 0;
  margin-bottom: 1em;
  border-bottom: 1px solid #e5e5e5;
}

.nt-dashboard-section-title {
  margin: 5px 0;
  line-height: 1.4;
  text-transform: uppercase;
}

#nt-map {
  width: 100%;
  height: calc(100vh - 150px);
  min-height: 600px;
}

#nt-jurisdiction-control {
  width: 100%;

  margin: 0;
  padding: 0;

  box-sizing: border-box;
}

#nt-jurisdiction-control label {
  display: block;

  margin-bottom: 6px;

  font-size: 11px;

  font-weight: 600;
}

#nt-jurisdiction-select {
  display: block;

  width: 100%;

  padding: 8px 9px;

  border: 1px solid #ccc;

  border-radius: 4px;

  background: #fff;

  box-sizing: border-box;

  font-size: 14px;
}

#nt-layer-filter {
  width: 100%;

  margin: 0;
  padding: 0;

  box-sizing: border-box;
}

.nt-info-panel {
  position: absolute;

  z-index: 1000;

  top: 20px;
  right: 20px;

  width: auto;
  max-width: calc(30vw - 40px);

  background: white;

  padding: 10px 20px;

  border-radius: 6px;

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);

  font-family: Arial, sans-serif;

  display: none;

  max-height: calc(100vh - 40px);

  overflow: hidden;

  box-sizing: border-box;
}

.nt-info-panel.visible {
  display: block;
}

#nt-info-panel-title {
  font-size: 20px;
  font-weight: 600;
  padding: 0.3em;
}

#nt-info-panel-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 5px;
}

.nt-close-button:hover {
  opacity: 0.6;
  background: #252628;
  color: #ffffff;
}

#nt-info-content {
  max-height: calc(45vh - 140px);

  overflow-y: auto;
  overflow-x: hidden;

  overflow-wrap: break-word;
  scrollbar-width: thin;

  box-sizing: border-box;
}

.nt-info-panel dl {
  margin: 0;
  padding: 0;
}

.nt-info-row {
  display: grid;

  grid-template-columns:
    150px
    minmax(0, 1fr);

  column-gap: 12px;

  padding: 6px 5px;

  border-radius: 4px;

  align-items: start;

  box-sizing: border-box;
}

.nt-info-row:nth-child(odd) {
  background: #f7f7f7;
}

.nt-info-row:nth-child(even) {
  background: #ffffff;
}

.nt-info-panel dt {
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: bold;
  width: auto;
  max-width: none;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.nt-info-panel dd {
  margin: 0;
  padding: 0;
  min-width: 0;
  font-size: 18px;
  line-height: 1.4;
  width: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

.nt-info-panel dd a {
  overflow-wrap: break-word;
  word-break: break-word;
  text-decoration: none;

  background-image: linear-gradient(to right, currentColor, currentColor);

  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;

  padding-bottom: 2px;
  opacity: 1;

  transition: opacity 0.2s ease;
}

.nt-info-panel dd a:hover {
  opacity: 0.5;
}

@media (max-width: 600px) {
  .nt-info-panel {
    top: 10px;
    right: 10px;

    width: calc(100% - 20px);

    max-width: none;

    padding: 15px;
  }

  #nt-info-content {
    max-height: calc(100vh - 120px);
  }

  .nt-info-row {
    grid-template-columns:
      100px
      minmax(0, 1fr);

    column-gap: 8px;
  }
}

.nt-close-button {
  color: black;
  padding: 0.3em;
  border: 0;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.nt-loading {
  position: absolute;

  z-index: 2000;

  top: 20px;
  left: 50%;

  transform: translateX(-50%);

  background: white;

  padding: 10px 16px;

  border-radius: 4px;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);

  font-family: Arial, sans-serif;

  display: none;
}

.nt-loading.visible {
  display: block;
}

#nt-layer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  cursor: pointer;
  user-select: none;
  transition: background 120ms ease;
}

#nt-map-wrapper #nt-layer-header:hover {
	background-color: rgba(0,0,0,0.05);
	color:black;
}

#nt-layer-header h5 {
	color:inherit;
}

#nt-layer-toggle {
  margin: 5px 0;
  font-size: 20px;
  line-height: 1;
  transition: transform 180ms ease;
}

#nt-layer-list.collapsed {
  max-height: 0;
  opacity: 0;

  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;

  transform: translateY(-4px);

  pointer-events: none;
}

.nt-layer-option {
  display: flex;
  align-items: center;

  gap: 6px;

  padding: 4px 5px;

  line-height: 1.2;

  cursor: pointer;
  user-select: none;

  border-radius: 3px;
}

.nt-layer-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

#nt-layer-list {
  width: auto;
  max-width: 20vw;
  margin-top: 4px;
  padding: 3px;
  box-sizing: border-box;
  scrollbar-width: thin;

  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);

  max-height: 280px;
  overflow-y: auto;

  opacity: 1;
  transform: translateY(0);

  transition:
    max-height 180ms ease,
    opacity 140ms ease,
    transform 180ms ease;

  font-size: 14px;
}

.nt-layer-option:active {
  transition:
    color 500ms ease-in-out,
    background 500ms,
    ease-in-out;
  background: transparent;
  color: transparent;
}

.nt-layer-option input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 14px;
  border: 1px solid #777;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.nt-layer-option input[type="checkbox"]:checked {
  background: #333;
  border-color: #333;
}

.nt-layer-option input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.nt-layer-option span {
  flex: 1;
}

.nt-layer-legend-toggle {
  width: 20px;
  height: 20px;

  margin-left: auto;
  padding: 0;

  border: none;
  background: transparent;

  font-size: 14px;
  line-height: 1;

  cursor: pointer;

  color: #555;

  transition:
    transform 120ms ease,
    color 120ms ease;
}

.nt-layer-legend-toggle:hover {
  color: #000;
}

.nt-layer-legend {
  padding: 2px 2px 2px 22px;
}

.nt-legend-item {
  display: flex;
  align-items: center;
  font-family: sans-serif, arial;
  gap: 7px;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.2;
}

.nt-legend-swatch {
  width: 1em;
  height: 1em;

  flex: 0 0 12px;

  border-radius: 2px;

  border: 1px solid rgba(0, 0, 0, 0.25);
}

.nt-tribunal-tooltip {
  font-family: sans-serif, arial;
  font-size: 11px;
  background: none;
  color: #333;
  font-weight: 500;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 -1px 0 #fff,
    0 1px 0 #fff,
    -1px 0 0 #fff,
    1px 0 0 #fff;
  border: none;
  pointer-events: none;
  user-select: none;
  box-shadow: none;
}

.hover-over {
  cursor: crosshair;
}

.nt-tribunal-tooltip::before {
  display: none;
}

.nt-info-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 12px 0;
    margin-top: 12px;

    border-top: 1px solid #e5e5e5;
}

.nt-info-nav-button {
    width: 32px;
    height: 32px;

    padding: 0;

    border: 1px solid #d6d6d6;
    border-radius: 4px;

    background: #fff;
    color: #333;

    font-size: 18px;
    line-height: 1;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.nt-info-nav-button:hover {
    background: #f5f5f5;
}

.nt-info-nav-button:active {
    background: #eaeaea;
}

.nt-info-nav-button:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.nt-info-nav-counter {
    min-width: 55px;

    text-align: center;

    font-size: 13px;
    color: #666;
}

.leaflet-pane.hidden {
    display:none;
}

.disabled,
[disabled],
:disabled,
[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
  user-select: none;
  
  background-color: #f3f4f6; 
  color: #9ca3af;           
  border-color: #e5e7eb;       
  
  box-shadow: none;
  outline: none;
}

.tooltip-btn:hover {
  background-color: rgba(0,0,0,0.05);
}

.tooltip-btn {
  position: relative;
}

/* Tooltip text box */
.tooltip-btn::after {
  content: attr(data-tooltip); 
  position: absolute;
  bottom: 125%; 
  right: 0;
  background-color: #212121;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  
  /* Smooth transition */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  pointer-events: none; 
  z-index: 1000;
}

/* Tooltip pointer arrow */
.tooltip-btn::before {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #212121 transparent transparent transparent; /* Arrow pointing down */
  
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
  z-index: 1000;
}

/* Reveal tooltip on hover and focus (for accessibility) */
.tooltip-btn:hover::after,
.tooltip-btn:hover::before,
.tooltip-btn:focus-visible::after,
.tooltip-btn:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

#nt-search-control {
    position: relative;
}

#nt-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 34px 9px 11px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #333;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#nt-search-input::-webkit-search-cancel-button,
#nt-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#nt-search-input::placeholder {
    color: #999;
}

#nt-search-input:focus {
    outline: none;
    border-color: #888;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

#nt-search-clear {
    position: absolute;
    right: 9px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #888;
    font-size: 17px;
    line-height: 18px;
    cursor: pointer;
}

#nt-search-clear:hover {
    background: #eee;
    color: #444;
}

#nt-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 5px);
    max-height: 350px;
    overflow-y: auto;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

#nt-search-results[hidden] {
    display: none;
}

.nt-search-status {
    padding: 14px 12px;
    font-size: 12px;
    color: #777;
    text-align: center;
}

.nt-search-summary {
    padding: 11px 12px 9px;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
}

.nt-search-summary-title {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

.nt-search-summary-count {
    margin-top: 2px;
    font-size: 11px;
    color: #888;
}

.nt-search-category {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.nt-search-category:last-child {
    border-bottom: 0;
}

.nt-search-category:hover {
    background: #f7f7f7;
}

.nt-search-category:focus {
    outline: none;
    background: #f5f5f5;
}

.nt-search-category:focus-visible {
    box-shadow: inset 0 0 0 2px #aaa;
}

.nt-search-category-title {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.nt-search-category-count {
    min-width: 28px;
    margin-right: 8px;
    padding: 2px 5px;
    border-radius: 10px;
    background: #f0f0f0;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
}

.nt-search-category-arrow {
    width: 12px;
    font-size: 18px;
    line-height: 1;
    color: #aaa;
}

.nt-search-layer-header {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 8px 0 4px;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
}

.nt-search-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-right: 3px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #666;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.nt-search-back:hover {
    background: #e9e9e9;
    color: #333;
}

.nt-search-back:focus {
    outline: none;
}

.nt-search-back:focus-visible {
    box-shadow: inset 0 0 0 2px #aaa;
}

.nt-search-layer-title {
    flex: 1;
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.nt-search-layer-header + .nt-search-summary-count {
    margin: 0;
    padding: 7px 12px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.nt-search-result {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.nt-search-result:last-child {
    border-bottom: 0;
}

.nt-search-result:hover {
    background: #f7f7f7;
}

.nt-search-result:focus {
    outline: none;
    background: #f5f5f5;
}

.nt-search-result:focus-visible {
    box-shadow: inset 0 0 0 2px #aaa;
}

.nt-search-result-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.nt-search-result-meta {
    margin-top: 3px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.3;
    color: #777;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#nt-search-results::-webkit-scrollbar {
    width: 7px;
}

#nt-search-results::-webkit-scrollbar-track {
    background: transparent;
}

#nt-search-results::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: #ccc;
}

#nt-search-results::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.nt-search-highlight {
    padding: 1px 2px;
    border-radius: 2px;
    background: #fff1c7;
    color: inherit;
    font-weight: 700;
}
