/* Ensure full size for the HTML body and remove scrollbars */
html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;

  /* Disable selection of anything, as everything happens 'inside' the canvas */
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10, 11 */
  user-select: none;
  tab
}

main {
  width: inherit;
  height: inherit;
  position: relative;
}

/* The canvas occupies the full screen – note the id "view" as required */
#view {
  width: inherit;
  height: inherit;
  touch-action: none; /* Disable touch actions to improve pointer drag support */
}
/* Style for the tooltip that shows point data on hover */
.tooltip {
  position: absolute;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 5px;
  display: block;
  pointer-events: none;
  font-size: 12px;
}

.textselect {
  -webkit-user-select: auto; /* Safari */
  -ms-user-select: auto; /* IE 10, 11 */
  user-select: auto;
  pointer-events: auto;
}
.clickable {
  pointer-events: auto;
  cursor: pointer;
}

#UI {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10; /* Higher than canvas */
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Allows UI interaction */

  display: grid;
  grid-template-areas:
    "top-left top-left .      top-right top-right"
    ".        .        .      .         mid-right"
    ".        .        .      .         mid-right"
    ".        .        .      .         mid-right"
    ".        .        .      .         .        ";
  gap: 1rem;
  padding: 1rem;
}

#UI > * {
  border-radius: 2pc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#UI > dialog {
  grid-area: dialog;
  width: 60%;
  height: 60%;
}

#UI > #mid-right {
  grid-area: mid-right;
  display: flex;
  flex-direction: column-reverse;
  box-shadow: none;
  height: 65%;
  align-items: flex-end;
  margin-right: 2vw;
}

#mid-right > * {
  padding: inherit;
  border-radius: 1pc;
  box-shadow: inherit;
  width: fit-content;
  font-size: 3vh;
  margin-right: 1vw;
  font-weight: bold;
  padding: 1%;
}

#UI > #top-left {
  grid-area: top-left;
  display: flex;
  box-shadow: none;
}

#UI > #top-right {
  grid-area: top-right;
  display: flex;
  box-shadow: none;
}

#top-left > * {
  height: 1%;
}

#pickedDetailsMenu {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

#pickedDetailsMenu li {
  margin-right: 20px;
}

#pickedDetailsMenu li:last-child {
  margin-right: 0;
}


/* Pretty Table Styling */
.datatable {
  border-collapse: collapse;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.95rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.datatable thead {
  background-color: #2c3e50;
  color: #ecf0f1;
  text-align: left;
}

.datatable thead th {
  padding: 12px 16px;
  border-bottom: 2px solid #34495e;
}

.datatable tbody tr {
  border-bottom: 1px solid #ddd;
  transition: background-color 0.3s ease;
}

.datatable tbody tr:hover {
  background-color: #f1f1f1;
}

.datatable tbody td {
  padding: 10px 16px;
  color: #333;
}

/* Zebra striping for readability */
.datatable tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Optional: rounded corners on the top row */
.datatable thead:first-child th:first-child {
  border-top-left-radius: 8px;
}
.datatable thead:first-child th:last-child {
  border-top-right-radius: 8px;
}

.center {
  text-align: center;
}
