@font-face{
  src: url('fonts/Cooper-Regular.otf');
  font-family: "Cooper";
}
@font-face{
  src: url('fonts/Cooper-Medium.otf');
  font-family: "Cooper";
  font-weight: 500;
}
@font-face{
  src: url('fonts/Cooper-SemiBold.otf');
  font-family: "Cooper";
  font-weight: 600;
}
@font-face{
  src: url('fonts/Cooper-Bold.otf');
  font-family: "Cooper";
  font-weight: 700;
}

:root {
  --primary-color: #CD070F;
  --bg-color: #fff;
  --text-color: #333;
  --link-color: #005da9;
  --button-text-color: #666;
  --minor-bg-color: hsl(0, 0%, 97.5%);
  --hover-bg-color: #eee;
  --border-radius: 8px;
  --grid-color: #ddd;
  --active-grid-color: #bbb;
  --box-shadow: rgba(0,0,0,0.2) 0 0.5px 1.25px;
  --sidebar-width: 360px;
  --title-font: 'Cooper', Georgia, serif;
}
b, strong {
  font-weight: bold;
}
i {
  font-style: italic;
}
a {
  color: var(--link-color);
  text-decoration: none;
}
a:hover, a:focus {
  text-decoration: underline;
}
svg {
  display: block;
}
body {
  margin: 0;
  padding: 0;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3em;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}
h1 {
  font-size: 21px;
}
h2 {
  font-size: 16px;
}
h3 {
  font-size: 14px;
}
h4 {
  font-size: 13px;
}

hr {
  margin: 2em 0;
  border: 0;
  border-bottom: 1px solid var(--grid-color);
}

input[type=search] {
  border: 1px solid var(--grid-color);
  width: 100%;
  font-size: 14px;
  padding: 0.5em 0.5em 0.5em 2.5em;
  border-radius: 100px;
}
input[type=search]:focus, input[type=search]:active {
  border: 1px solid var(--active-grid-color);
}

button {
  background: var(--bg-color);
  margin: 0;
  border: 0;
  padding: 6px 12px;
  cursor: pointer;
  color: inherit;
  line-height: inherit;
  position: relative;
  font-size: 12px;
  color: var(--button-text-color);
}
button:hover, button:focus {
  background: var(--hover-bg-color);
  color: var(--text-color);
}
button > * {
  display: inline-block;
  vertical-align: middle;
}
button > *:not(:last-child) {
  margin-right: 0.2em;
}
button > *:not(:first-child) {
  margin-left: 0.2em;
}

.hidden {
  display: none !important;
}

.prose {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.7em;
}
.prose > * {
  margin-bottom: 9px;
}
.prose > h3:not(:first-child) {
  margin-top: 1.5em;
}
.icon {
  flex: 0 0 auto;
}

.overlay {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(3px);
  border-radius: var(--border-radius);
  border: 1px solid var(--grid-color);
  box-shadow: var(--box-shadow);
  position: absolute;
  z-index: 100;
}

#map {
  width: 100vw;
  height: 100vh;
  position: relative;
}
#map .maplibregl-ctrl-top-right {
  top: 56px !important;
}
#ui {
  width: 100vw;
  height: 100vh;
  position: absolute;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  align-items: start;
}
#ui > * {
  pointer-events: initial;
}
#header {
  width: 380px;/*var(--sidebar-width);*/
  max-width: 100vw;
  max-height: 100vh;
  background: var(--bg-color);
  border: 1px solid var(--grid-color);
  border-top: 0;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  box-shadow: var(--box-shadow);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.themeInspectorOpen #header {
  height: 100vh;
  border-radius: 0;
  display: flex;
  flex-flow: column;
}
#header > button {
  position: relative;
}
#header-header {
  border-bottom: 1px solid var(--grid-color);
  padding: 0 6px;
}
button#main-theme-title {
  align-items: center;
  display: flex;
  font-size: 17px;
  padding: 7px 12px 9px 12px;
  text-align: left;
  width: 100%;
}
html:not(.themeInspectorOpen) #main-theme-title {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}
.themeInspectorOpen #main-theme-title::after {
  background-color: var(--grid-color);
  height: 1px;
  content:"";
  position: absolute;
  display: block;
  bottom: -1px;
  width: calc(100% - 24px);
}
button#main-theme-title:empty {
  display: none;
}
button#main-theme-title .text-part {
  flex-basis: 100%;
}
button#explore-maps {
  font-weight: bold;
}
button#main-theme-title .theme-title {
  color: var(--primary-color);
}
.pre-theme-title {
  font-size: 0.825em;
  font-weight: 600;
}
.theme-title {
  font-family: var(--title-font);
  font-weight: 600;
}

#theme-explorer {
  margin-top: -1px;
  width: 150%;
  max-width: calc(100vw - 12px);
  height: 60vh;
  max-height: min(calc(100vh - 30px), 360px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.search-wrap {
  display: flex;
  position: relative;
  align-items: center;
  padding: 12px;
  background-color: var(--minor-bg-color);
}
.search-wrap img {
  position: absolute;
  margin-left: 0.75em;
  pointer-events: none;
}
.search-results {
  overflow-y: auto;
  border-top: solid 1px var(--grid-color);
}
.theme-item button {
  padding: 9px 12px 10px 12px;
  width: 100%;
  text-align: unset;
  font-size: 15px;
  display: flex;
  align-items: center;
}
.theme-item button::after {
  background-color: var(--grid-color);
  height: 1px;
  content:"";
  position: absolute;
  display: block;
  left: 6px;
  right: 0;
  bottom: 0;
}

#theme-inspector {
  padding: 18px;
  overflow-y: auto;
}

footer {
  margin-top: 48px;
  border-top: 1px solid var(--grid-color);
}

#topbar {
  flex-basis: 100%;
  background-color: rgba(255,255,255,0.5);
  border-bottom: 1px solid var(--grid-color);
  padding: 12px;
  white-space: nowrap;
  backdrop-filter: blur(3px);
  overflow-x: auto;
  display: flex;
}
#topbar > *:not(:last-child,.spacer) {
  margin-right: 12px; 
}
#topbar .spacer {
  flex-basis: 100%;
}
#topbar .button-group {
  filter: drop-shadow(var(--box-shadow));
}
#topbar .button-group > button {
  box-shadow: none;
}
#topbar .button-group > button:not(:last-child){
  margin-right: -1px;
}
#topbar button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--grid-color);
  font-weight: 600;
  font-size: 12px;
  box-shadow: var(--box-shadow);
}
#topbar button:focus, #topbar button:hover {
  border-color: var(--active-grid-color);
}
