/* --------------------------------------------------
   Base layout
-------------------------------------------------- */

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: white;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

/* Make the main container fluid instead of 900px */
#container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;

  margin: 0;
  padding: 0;

  box-sizing: border-box;

  text-align: left;
  border: 0;
  background: white;
}


/* --------------------------------------------------
   Header / navigation
-------------------------------------------------- */

#supra-header {
  position: relative !important;

  width: 100%;
  margin: 0;
  padding: 0;

  box-sizing: border-box;

  background: #967E75;
  z-index: 10;
}

.top-menu {
  width: 100%;
  min-height: 44px;

  margin: 0;
  padding: 8px 12px;

  box-sizing: border-box;

	background: #6F4037;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  position: relative;
  z-index: 10;
}

.top-menu-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;

  flex: 0 0 auto;
}

.top-menu a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;

  font-size: 16px;
  line-height: 28px;
}

.top-menu a:hover {
  text-decoration: underline;
}


/* --------------------------------------------------
   Search
-------------------------------------------------- */

#search_form {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 8px;

  margin: 0;
  padding: 0;

  flex: 1 1 auto;
}

.search-options {
  display: flex;
  align-items: center;
  gap: 10px;

  color: white;
  font-size: 13px;

  white-space: nowrap;
}

.search-options label {
  display: flex;
  align-items: center;
  gap: 3px;
}

.search-options input {
  margin: 0;
}

.search-input {
  display: flex;
  align-items: center;

  gap: 5px;
}

#search {
  width: 180px;
  max-width: 30vw;

  height: 28px;

  box-sizing: border-box;

  padding: 4px 7px;

  border: 1px solid #aaa;
  border-radius: 3px;

  font-size: 14px;
}

#search_button {
  height: 28px;

  padding: 3px 10px;

  border: 1px solid #777;
  border-radius: 3px;

  background: #fff;

  cursor: pointer;

  font-size: 13px;
}


/* --------------------------------------------------
 Map + right panel
-------------------------------------------------- */

#map-layout {
  display: flex;
  width: 100%;
  height: calc(100vh - 44px);
  min-height: 0;
}

#map {
  position: relative;

  flex: 1 1 auto;

  width: auto;
  height: 100%;

  min-width: 0;

  background-color: #e5e3df;
  z-index: 0;
}

#right-panel {
  flex: 0 0 350px;

  width: 350px;
  height: 100%;

  box-sizing: border-box;

  background: #fafafa;
  border-left: 1px solid #c8c0bc;

  overflow-x: hidden;
  overflow-y: auto;

  font-family: Arial, sans-serif;
  font-size: 13px;

  color: #444;

  /* subtle scrollbar separation */
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.08);
}

/* Individual result */

.sidebar_item {
  position: relative;

  box-sizing: border-box;

  padding: 9px 12px 9px 12px;

  border-bottom: 1px solid #e1dcda;

  background: #fff;

  line-height: 1.35;

  overflow-wrap: break-word;

  transition: background-color 0.15s ease;
}


/* Alternate rows */

.sidebar_item:nth-child(even) {
  background: #fcfbfa;
}


/* Hover */

.sidebar_item:hover {
  background: #f3eeee;
}


/* Main #number link */

.sidebar_item .sidebar_link {
  color: #804C42;

  text-decoration: none;

  font-weight: bold;

  margin-right: 3px;
}

.sidebar_item .sidebar_link:hover {
  color: #f78910;

  text-decoration: underline;
}


/* Plus icon */

.sidebar_item img {
  width: 16px;
  height: 16px;

  margin-left: 2px;

  vertical-align: middle;

  opacity: 0.75;
}

.sidebar_item img:hover {
  opacity: 1;
}

.hidden {
  display: none !important;
}

/* Expanded "more information" */

.sidebar_more {
  margin-top: 6px;
  margin-left: 20px;
  padding: 6px 8px;

  background: #f5f2f0;
  border-left: 3px solid #967E75;

  color: #666;
  font-size: 11px;
  line-height: 1.4;
}

.sidebar_more.hidden {
  display: none !important;
}


/* Pagination */

.panel-pagination {
  padding: 12px 8px;

  text-align: center;

  background: #f5f2f0;

  border-top: 1px solid #ddd6d2;
}

.panel-pagination a,
.panel-pagination .place-link {
  display: inline-block;

  min-width: 26px;

  margin: 2px;

  padding: 4px 6px;

  box-sizing: border-box;

  border: 1px solid transparent;

  border-radius: 3px;

  color: #804C42;

  text-decoration: none;

  font-size: 12px;
}

.panel-pagination a:hover,
.panel-pagination .place-link:hover {
  background: #fff;

  border-color: #c8bdb8;

  color: #f78910;

  text-decoration: none;
}

/* --------------------------------------------------
   Results counter
-------------------------------------------------- */

#nr_rezultate {
  position: absolute;

  bottom: 35px;
  left: 8px;

  color: #fff;

  z-index: 5;

  font-size: 12px;
  font-weight: bold;
}


/* --------------------------------------------------
   Mobile
-------------------------------------------------- */

@media (max-width: 700px) {

  #supra-header {
    position: relative !important;
  }

  .top-menu {
    min-height: auto;

    padding: 8px 10px;

    flex-direction: column;
    align-items: stretch;

    gap: 8px;
  }

  .top-menu-left {
    width: 100%;

    justify-content: center;

    gap: 12px;
  }

  .top-menu a {
    font-size: 14px;
    line-height: 24px;
  }

  #search_form {
    width: 100%;

    flex-direction: column;
    align-items: stretch;

    gap: 7px;
  }

  .search-options {
    justify-content: center;

    font-size: 13px;
  }

  .search-input {
    width: 100%;

    display: flex;
  }

  #search {
    width: auto;
    max-width: none;

    flex: 1 1 auto;

    height: 34px;

    font-size: 16px;
  }

  #search_button {
    height: 34px;

    padding: 3px 14px;

    font-size: 14px;
  }

  /*
     Header is now taller on mobile, so don't use
     the old fixed 44px calculation.
  */
  #map-layout {
    height: auto;
    min-height: 0;

    display: flex;
    flex-direction: column;
  }

  #map {
    width: 100%;
    height: calc(100vh - 115px);

    min-height: 300px;

    flex: none;
  }

  #right-panel {
    width: 100%;
    height: auto;

    max-height: 50vh;

    flex: none;

    overflow-y: auto;

    border-top: 1px solid #ccc;
  }

  .sidebar_item {
    padding: 11px 12px;

    line-height: 1.4;
  }

  .sidebar_item img {
    width: 10px;
    height: 10px;
  }

  .sidebar_more {
    margin-left: 15px;

    padding: 7px 9px;

    font-size: 12px;
  }

  .panel-pagination {
    padding: 12px 5px;
  }

  .panel-pagination a,
  .panel-pagination .place-link {
    min-width: 30px;

    padding: 5px 7px;

    font-size: 13px;
  }

}


/* --------------------------------------------------
   Very small phones
-------------------------------------------------- */

@media (max-width: 400px) {

  .top-menu {
    padding: 7px;
  }

  .top-menu-left {
    gap: 9px;
  }

  .top-menu a {
    font-size: 13px;
  }

  .search-options {
    font-size: 12px;
    gap: 7px;
  }

  #search_button {
    padding-left: 10px;
    padding-right: 10px;
  }

}