:root {
  --entergeo-surface: #ffffff;
  --entergeo-surface-subtle: #f8fafc;
  --entergeo-border: #dbe3ee;
  --entergeo-text: #0f172a;
  --entergeo-text-muted: #475569;
  --entergeo-primary: #EA641B;
  --entergeo-accent: #F3B705;
  --entergeo-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  --entergeo-radius: 14px;
  --entergeo-logo-url: url(/assets/img/entergeo-branding-default.png);
  --entergeo-logo-size: 40px;
}

html, body, #container {
  background: var(--entergeo-surface-subtle);
  color: var(--entergeo-text);
}

div#splash {
  background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}

.topbar,
.side-panel,
.sidebar,
.modal-dialog,
.dock,
.taskbar {
  background: var(--entergeo-surface);
  color: var(--entergeo-text);
  border-color: var(--entergeo-border);
  box-shadow: var(--entergeo-shadow);
}

.topbar,
.taskbar {
  border-radius: var(--entergeo-radius);
}

div.TopBar {
  align-items: center;
  gap: 12px;
}

div.TopBar img.topbar-logo {
  width: auto;
  height: var(--entergeo-logo-size);
  flex: 0 0 auto;
}

button,
.button,
input,
select,
textarea {
  border-radius: 10px;
}

button,
.button,
button:focus,
.button:focus {
  box-shadow: none;
}

button:hover,
.button:hover {
  filter: brightness(0.98);
}

button.primary,
.button-primary,
.map-button-active,
button.active {
  background: var(--entergeo-primary);
  border-color: var(--entergeo-primary);
  color: #fff;
}

button.secondary,
.button-secondary,
button.warning {
  background: var(--entergeo-accent);
  border-color: var(--entergeo-accent);
  color: #fff;
}

a,
.link {
  color: var(--entergeo-primary);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #EA641B33;
  outline-offset: 1px;
  border-color: var(--entergeo-primary);
}

/* QWC2 modern theme palette overrides. The viewer's own theme variables are
   defined by the app bundle (and the .dark/.highcontrast schemes), so these
   overrides sit at higher specificity to win regardless of load order. */
:root:root:root {
  --color-active: #EA641B;
  --focus-outline: 2px solid #EA641B;
  --text-color-link: #EA641B;
  --button-bg-color-active: #EA641B;
  --button-bg-color-active-hover: #EA641B;
  --button-text-color-active: #ffffff;
  --button-text-color-active-hover: #ffffff;
  --map-button-active-bg-color: #EA641B;
  --map-button-active-text-color: #ffffff;
  --titlebar-bg-color: #EA641B;
  --titlebar-text-color: #ffffff;
  --list-section-bg-color: #F3B705;
  --list-section-text-color: #0f172a;
  --list-item-bg-color-active: #EA641B;
  --list-item-text-color-active: #ffffff;
}

/* Brand accent line along the bottom edge of the top bar. Doubled class keeps
   this above the viewer's own .TopBar shadow rule regardless of load order. */
div.TopBar.TopBar {
  box-shadow: inset 0 -3px 0 #EA641B;
}

/* Paint input borders above their children: fractional browser zoom can let
   opaque inputs cover the container's native one-pixel border. Keep the native
   border's layout space and focus outline, but draw the visible edge last. */
div.input-container.searchbox-field,
div.input-container.bottombar-scale-combo {
  position: relative;
  border-color: transparent;
}
div.input-container.searchbox-field::after,
div.input-container.bottombar-scale-combo::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--border-color);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* Theme and basemap thumbnails: the viewer sizes them into a fixed box, so
   scale to fill instead of stretching whatever aspect the image has. */
:root:root img[src*="mapthumbs"] {
  object-fit: cover;
}
/* Open Sans - self-hosted variable font (latin + latin-ext subsets).
   Source: Google Fonts (Open Sans v44). License: SIL Open Font License 1.1,
   see LICENSE.txt in this directory. No external font CDN is used at runtime. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/opensans/OpenSans-latin.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;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/opensans/OpenSans-latin-ext.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;
}


/* Platform typeface: self-hosted, no external font CDN. */
html:root {
  --entergeo-font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
html:root,
html:root body,
html:root button,
html:root input,
html:root select,
html:root textarea {
  font-family: var(--entergeo-font-family);
}
