:root {
  --bg: #111;
  --fg: #eee;
  --accent: #2ecc71;
  --muted: #aaa;
  --border: #333;
}

.hours {
  font-weight: bold;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

h1, h2 {
  margin-top: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

th, td {
  padding: 0.6rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

td.center {
  text-align: center;
}

td.nowrap {
  white-space: nowrap;
}

td.nowrap-left {
  white-space: nowrap;
  text-align: left;
}

span.nowrap {
  white-space: nowrap;
}

td.nowrap-right {
  white-space: nowrap;
  text-align: right;
}

th.right {
  text-align: right;
}

td.bold {
  font-weight: bold;
}

span.bold {
  font-weight: bold;
}

th.center {
  text-align: center;
}

td.visitor-tz {
  border-top: 3px solid #f0a500;
}

th.visitor-tz {
  border-top: 3px solid #f0a500;
}

th.visitor-tz,
td.visitor-tz {
  background-color: #5A5A5A; /* dark grey */
}

.blink-red {
  font-weight: bold;
  text-align: center;
  animation: blinkRed 1s step-start infinite;
}
@keyframes blinkRed {
  0%, 49%   { color: white; }
  50%, 100% { color: red; }
}

td.top {
  vertical-align: top;
}

td.center {
  text-align: center;
}

th.header {
  vertical-align: bottom;
  text-align: left;
}

table {
  border-collapse: collapse;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  background: #1b1b1b;
}

.small-text {
  font-size: 0.8rem;
  color: var(--muted);
}

#radioTable td,
#radioTable th {
  line-height: 1.2;
}

.header-row {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.header-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.header-logo {
  height: auto;
  max-height: 240px;
  object-fit: contain;
}

.show-tooltip-wrap {
  position: relative;
  display: inline-block;
}

.show-tooltip-box {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  display: none;
  padding: 6px 8px;
  border: 1px solid #666;
  border-radius: 4px;
  background: #fff;
  color: #000;
  white-space: pre;
  font-size: 0.9em;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  pointer-events: none;
}

.show-tooltip-box::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
  filter: drop-shadow(0 1px 0 #666);
}

.show-tooltip-wrap:hover .show-tooltip-box,
.show-tooltip-wrap:focus-within .show-tooltip-box {
  display: block;
}

@media (max-width: 700px) {
  .header-row {
    flex-direction: column;
    align-items: center;
  }

  .header-logo {
    max-width: 100vw;
    max-height: 200px;
    margin-bottom: 10px;
    cursor: default;
  }

  .logo-overlay {
    display: none;
  }

  #clockTable {
    width: 100%;
  }
}

.stacked-cell-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: -0.6rem; /* cancels normal td padding */
}

.stacked-cell-inner a {
  display: block;
  padding: 0.4rem 0.6rem;
  text-align: center;
}

.stacked-cell-inner .divider {
  height: 1px;
  background: var(--border);
}

.logo-hover-container {
  position: relative;
}

.logo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.2s ease;

  z-index: 99999;
}

@media (hover: hover) and (pointer: fine) {
  .logo-hover-container:hover .logo-overlay {
    opacity: 1;
  }
}

.logo-large {
  max-width: 95vw;
  max-height: 95vh;

  image-rendering: auto;

  box-shadow: 0 0 40px rgba(0,0,0,0.6);
  border-radius: 8px;
}

h1 a {
  color: var(--fg);
}

.compact-table td {
  padding: 2px 6px;
}

.thumbnail-container {
  position: relative;
  display: inline-block;
}

.thumbnail-container img.thumbnail {
  width: 100px;
  height: auto;
  cursor: pointer;
  border: 1px solid #ccc;
}

.thumbnail-container img.fullsize {
  display: none;
  position: absolute;
  top: 0;
  left: 110%;
  max-width: 626px;
  max-height: 800px;
  border: 1px solid #333;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  z-index: 10;
  background: white;
}

.thumbnail-container:hover img.fullsize {
  display: block;
}

.timezone-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.about-text {
  max-width: 700px;
}
