html, body, #mapDiv, #mainWindow {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  overflow-y: hidden;
}
#mainWindow {
  padding-bottom: 56px; /* navbar pushes content downwards */
}

/* Modernare gränssnitt av navbar */
.navbar {
  background: linear-gradient(to right, #eaf4f4, #eaf4f0, #eaf3ed, #ecf0e7);
  border: 1px solid rgba(17,24,39,0.08);
  border-radius: 0 0 12px 12px;
  animation: fadeInRibbon 0.6s ease-in-out;
}

/* Meny Område, Bakgrundskarta, Verktyg, Andra karttjänster */
.navbar-nav .nav-link {
  position: relative;
  color: #000;
  font-weight: 600;
  padding: 0.4rem 1.0rem;
  margin: 0 2px;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 10px;
  white-space: nowrap;
  text-align: center;
}

/* Loader-linje vid hover */
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0px;
  width: 0;
  height: 4px;
  background-color: #000;
  opacity: 0;
  transition: width 0.5s ease, opacity 0.4s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
  opacity: 1;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255,255,255,0.7);
  color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dropdown-menu {
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  animation: fadeInDropdown 0.3s ease-in-out;
  background-color: rgba(255,255,255,0.95);
  max-height: 60vh;
  overflow-y: auto;
  position: absolute;
}

Scroll indikator för dropdown
.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 3px;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  transition: background-color 0.2s ease;
  border-radius: 6px;
}

.dropdown-item:hover {
  background-color: #f0f0f0;
  color: #007bff;
}

.esri-zoom {
  background-color: transparent;
  box-shadow: none;
}

.modal-content {
  border-radius: 0.8rem;
}

.esri-component {
  border-radius: 0.8rem;
}

.esri-zoom .esri-widget--button {
  border-radius: 0.8rem;
}

.linkicon {
  padding-left: 2px;
  padding-bottom: 3px;
}

img {
  border-style: none;
}
#tocBtnDiv {
  position: absolute;
  right: 10px;
  top: 66px; /* navbar 56px */
  background-color: white;
  padding: 12px;
}
#cardTocDiv {
  display: flex;
  position: absolute;
  right: 0px;
  top: 54px; /* navbar */
  width: 300px;
  /*overflow-y: auto;*/
}
/* hide toc during transition */
#cardTocDiv > .collapsing {
  display: none;
}
#cardToc {
  padding: 12px;
  border-radius: 0.8rem;
}
#cardMeasure {
  padding: 10px;
  position: absolute;
  bottom: 0px;
  left: 0px;
}
#bookmarkContent, #modalLegendContent, #modalHelpContent {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}
#bookmarkContent > div > a:hover {
  background-color: #ffffff;
  color: #818182;
  text-decoration: underline;
}
#modalLegendContent {
  padding: 0;
}
#layerText {
  /* adjusted to legend text */
  margin-left: 7px;
  padding: 0 15px 12px 15px;
  font-size: 14px;
}
#layerText a {
  text-decoration: underline;
  color: #6e6e6e;
}
#modalAboutContent a {
  text-decoration: underline;
  color: #6e6e6e;
}
#toc .card-header {
  background-color: white;
  padding-left: 15px;
}
#toc {
  display: flex;
  flex: auto;
  flex-direction: column;
}
#scrollDiv, #cardTocContent {
  overflow-y: auto;
}
.card-body {
  padding: 0;
}
.card a {
  color: rgba(0,0,0,.7);
}
.card-footer {
  background-color: white;
  padding-left: 0;
  padding-bottom: 0;
}
.esri-attribution {
  font-size: 0.7em;
}
.esri-expand--drawer .esri-expand__mask--expanded {
  opacity: 0.5;
}
.esri-ui .esri-popup a {
  text-decoration: underline;
}
.esri-ui .esri-popup {
  z-index: 3;
}
.esri-view-width-less-than-large .esri-popup__action-text {
  display: block !important;
}
.esri-popup__inline-actions-container:only-child>.esri-popup__action, .esri-popup__inline-actions-container:only-child>.esri-popup__action-toggle {
  max-width: 50%; /* 70% */
}
.esri-popup__inline-actions-container>.esri-popup__action, .esri-popup__inline-actions-container>.esri-popup__action-toggle {
  max-width: 70%;
}
.esri-coordinate-conversion {
  width: 310px; /*default 400, för bred på mobilen, 310 verkar räcka, även för ie */
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
	border: 1px solid #ffffff;
	background: #ffffff;
	color: #000000;
  text-decoration: underline;
}
.ui-autocomplete .ui-menu-item {
  padding-left: 5px;
  padding-right: 5px;
}
.ui-autocomplete {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}
.esri-popup__main-container {
    max-height: 90% !important;
}
