/* Kanit - self-hosted (previously loaded from Google Fonts) */
@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/kanit-latin-ext-400.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/kanit-latin-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {font-family: "Kanit", sans-serif}
.full-height {height: 100%;}
a.w3-bar-item {color: silver;}
.nav-active {color: white;}

/* Font Awesome replacement icons */
.fa {display: inline-block; vertical-align: -0.143em; fill: currentColor;}

/* Card titles are <h1> for SEO but keep the size of the original <h5> */
h1.h5, h2.h5 {font-size: 18px;}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {position: absolute; left: -9999px; top: 0; z-index: 10; background: #fff; color: #000; padding: 8px 16px;}
.skip-link:focus {left: 8px; top: 54px;}

/* Honeypot field against spam bots */
.hp {position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;}

/* ---------- Registry: sortable table + pagination ---------- */
th[data-sort] {cursor: pointer; white-space: nowrap;}
th[data-sort]:focus-visible {outline: 2px solid #fff; outline-offset: -4px;}
th[aria-sort="ascending"]::after {content: " \25B4";}
th[aria-sort="descending"]::after {content: " \25BE";}

input[type="button"] {
  transition: all .3s;
  border: 0px solid #eee;
  padding: 6px 16px;
  text-decoration: none;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
input[type="button"]:not(.active) {background-color: #f1f1f1;}
input[type="button"]:disabled {cursor: default; color: #999;}
.active {background-color: #d8d8d8; color: #000000;}
input[type="button"]:hover:not(.active):not(:disabled) {background-color: #a8a8a8;}

/* ---------- Statistics ---------- */
.summary {margin: 0 0 8px;}
.summary b {font-size: 20px;}

.map-wrap {position: relative;}
.map {width: 100%; height: auto; display: block;}
.map path {fill: #fff; stroke: #bdbdbd; stroke-width: .5; vector-effect: non-scaling-stroke;}
.map path.has {stroke: #fff; cursor: pointer;}
.map path.has:hover, .map path.has:focus {stroke: #000; stroke-width: 1.5; outline: none;}
.map .ocean {fill: #fff; stroke: none;}
.map-legend {display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 12px; color: #555; margin: 4px 0 8px;}
.map-legend .ramp {display: inline-block; width: 120px; height: 10px; border: 1px solid #ccc;}
.tooltip {
  position: absolute; pointer-events: none; background: #000; color: #fff; padding: 4px 10px;
  font-size: 13px; white-space: nowrap; transform: translate(-50%, -130%); display: none; z-index: 2;
}

.charts {display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding-top: 8px; padding-bottom: 8px;}
.charts::before, .charts::after {display: none;} /* w3-container clearfix would take a grid cell */
.chart {text-align: left; margin: 0; background: #fff;}
.chart h3 {margin: 0; padding: 8px 16px; background: #000; color: #fff; font-size: 15px; letter-spacing: 1px; text-transform: uppercase;}
.chart ol {list-style: none; margin: 0; padding: 12px 16px 14px;}
.chart li {display: grid; grid-template-columns: minmax(64px, 38%) 1fr auto; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; border-bottom: 1px solid #eee;}
.chart li:last-child {border-bottom: 0;}
.chart li:hover {background: #f5f5f5;}
.chart .lbl {overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #000;}
.chart .track {height: 16px; background: #e6e6e6; min-width: 0;}
.chart .bar {display: block; height: 100%; min-width: 3px; background: #333;}
.chart li:hover .bar {background: #000;}
.chart .val {min-width: 58px; text-align: right; color: #000; font-variant-numeric: tabular-nums; white-space: nowrap;}
.chart .val b {font-size: 15px;}
.chart .val small {display: inline-block; min-width: 30px; color: #757575;}
.chart .empty {color: #757575; font-size: 13px; padding: 12px 16px;}


/* Home page text */
.intro {max-width: 820px; margin: 0 auto;}

[hidden] {display: none !important;}

/* header cells that looked like normal cells on the old site */
.plain-th th {font-weight: normal;}

/* Admin panel */
div.vert {height: 600px; overflow-y: auto;}
.thead {position: sticky; top: 0; background-color: black;}

/* map keeps the height of the old GeoChart: window height - 345px */
.map {max-height: max(180px, calc(100vh - 345px));}
