/* ============================
   KORT & KONTAINER
============================ */
#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#search-container {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.flex-row {
  display: flex;
  gap: 10px;
}

.search-wrapper {
  position: relative;
  margin-bottom: 10px;
  width: 100%;
}

/* ============================
   INPUTFELTER
============================ */
#search,
#vej1,
#vej2,
#routeFrom,
#routeTo,
#routeVia {
  width: 100%;
  height: 40px;
  font-size: 16px;
  padding: 8px;
  padding-right: 40px; /* plads til clear-knap */
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.flex-row .search-wrapper {
  flex-grow: 1;
  position: relative;
  width: 100%;
}

/* ============================
   CLEAR-KNAP
============================ */
.search-wrapper .clear-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #666;
  cursor: pointer;
  display: none;
}
.search-wrapper .clear-button:hover {
  color: #333;
}
.clear-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font-size: 18px;
  color: #666;
  cursor: pointer;
  display: none;
}
.clear-button:hover {
  color: #333;
}

/* ============================
   RESULTATLISTER
============================ */

/* Hoved-søg følger bredden på søgecontaineren */
#results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  z-index: 2000;
  display: none;
  box-sizing: border-box;
}

/* Vej 1 / Vej 2 / Rute-felter har bred liste (som den "almindelige" liste) */
#results-vej1,
#results-vej2,
#results-route-from,
#results-route-to,
#results-route-via {
  position: absolute;
  top: 100%;
  left: 0;
  width: 391px;
  background: white;
  z-index: 2000;
  display: none;
  box-sizing: border-box;
}

#results li,
#results-vej1 li,
#results-vej2 li,
#results-route-from li,
#results-route-to li,
#results-route-via li {
  padding: 8px;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#results li:hover,
#results-vej1 li:hover,
#results-vej2 li:hover,
#results-route-from li:hover,
#results-route-to li:hover,
#results-route-via li:hover {
  background: #eaeaea;
}
.highlight {
  background-color: #eaeaea !important;
}

/* ============================
   INFO-BOKSE
============================ */
#sidebar {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 400px;
  z-index: 1000;
  box-sizing: border-box;
}

#infoContainer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

#infoBox {
  display: none;
  position: relative;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

#infoBox a {
  margin-right: 10px;
}

#address {
  margin: 0;
  padding: 0;
  font-weight: bold;
  line-height: 1.6em;
}

#extra-info {
  font-size: 16px;
  color: #555;
  margin-top: 5px;
  line-height: 1em;
}

#streetviewLink {
  color: #007bff;
  text-decoration: none;
}
#streetviewLink:hover {
  text-decoration: underline;
}

#skraafotoLink {
  color: orange;
  margin-left: 8px;
  text-decoration: none;
}
#skraafotoLink:hover {
  text-decoration: underline;
}

/* Flex container for StreetView + Skråfoto links */
.info-upper-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* gør “Kommune … | Politikreds …” større */
#infoBox #info-meta {
  font-size: 16px;
  line-height: 1.3;
}

/* lidt luft under Eva.Net/Notes */
#infoBox #info-actions {
  margin-bottom: 6px;
}

#kildeangivelse {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: white;
  padding: 5px;
  font-size: 12px;
  border-radius: 4px;
  opacity: 0.8;
}

/* Statsvej info-boks */
#statsvejInfoBox {
  display: none;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
.hidden {
  display: none;
}

/* Koordinatboks */
#coordinateBox {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  display: none;
  z-index: 1000;
}

/* KommuneOverlay – vises nederst i venstre hjørne med transparent baggrund */
#kommuneOverlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: transparent;
  color: #333;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 14px;
  display: none;
  z-index: 1000;
}

/* Leaflet fix: cursor */
.leaflet-grab,
.leaflet-container {
  cursor: default !important;
}

/* Close-knapper */
#statsvejCloseBtn {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 18px;
  cursor: pointer;
  color: #666;
}
#statsvejCloseBtn:hover {
  color: #333;
}
#infoCloseBtn {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 18px;
  color: #666;
  cursor: pointer;
}
#infoCloseBtn:hover {
  color: #333;
}

/* ============================
   Distance Options knapper
============================ */
#distanceOptions {
  position: absolute;
  top: 10px;
  right: 60px;
  background: rgba(255,255,255,0.9);
  padding: 5px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 900;
}

.distance-btn {
  margin: 2px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}

/* ============================
   BBR Info-boks
============================ */

#bbrInfoBox {
  display: none;
  position: relative;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow-y: auto;
  max-height: 300px;
}

#bbrInfoBox details {
  margin-bottom: 5px;
}

#bbrInfoBox summary {
  font-weight: bold;
  cursor: pointer;
}

#bbrInfoBox pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 5px 0;
}

/* ============================
   Rute-panel
============================ */

/* Knapperne Start + Ryd i rute-panelet */
.route-button-group {
  display: flex;
  flex-direction: row;
  gap: 6px;
  width: 80px;          /* samme samlede bredde som den gamle Start-knap */
}

.route-button-group .route-btn {
  flex: 1;              /* del pladsen 50/50 */
  height: 40px;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

#routePanel {
  margin-top: 8px;
}

.route-summary {
  margin-top: 5px;
  font-size: 13px;
  color: #333;
}

/* Rute-indstillinger */
.route-options {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(245, 245, 245, 0.9);
  font-size: 13px;
}

.route-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.route-options-row label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-options select,
.route-options input[type="number"] {
  height: 28px;
  font-size: 13px;
}

.route-avoid-features {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-avoid-features legend {
  font-weight: bold;
  margin-right: 4px;
}

.route-avoid-features label {
  font-weight: normal;
}

.route-avoid-areas-label {
  flex-direction: column;
  align-items: flex-start !important;
}

#routeAvoidPolygons {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-size: 12px;
}

/* ============================
   Udland-checkbox under søg
============================ */
.search-options-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px 0;
  font-size: 13px;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.search-hint {
  color: #666;
  font-size: 12px;
}
/* ORS geocode tæller (Udland) */
.ors-quota-indicator {
  display: inline-block;
  margin-left: 6px;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}

/* BBR infoboks styling */
#bbrInfoBox {
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  max-width: 400px;
  display: none;
  z-index: 1000;
}

#bbrInfoBox h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.bbr-category {
  margin-bottom: 6px;
  cursor: pointer;
  background: #f0f0f0;
  padding: 6px;
  border-radius: 4px;
}

.bbr-category:hover {
  background: #e8e8e8;
}

.bbr-category.active .bbr-category-content {
  display: block;
}

.bbr-category .bbr-category-content {
  display: none;
  padding-top: 4px;
  font-size: 14px;
  color: #333;
}
/* ============================
   BBR bygningsikoner på kortet
============================ */
.bbr-building-icon-wrapper {
  border: none;
  background: transparent;
}

.bbr-building-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 128, 0, 0.88);
  color: #fff;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
  border: 2px solid #fff;
  position: relative;
}

/* ============================
   BBR tekniske anlæg ikoner på kortet
============================ */
.bbr-tech-icon-wrapper {
  border: none;
  background: transparent;
}

.bbr-tech-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(220, 0, 0, 0.9);
  color: #fff;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 0 4px rgba(0,0,0,0.6);
  border: 2px solid #fff;
  position: relative;
}

/* ============================
   BBR tekniske anlæg ikoner
============================ */

.bbr-tech-icon-wrapper {
  border: none;
  background: transparent;
}

.bbr-tech-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(220, 0, 0, 0.9);
  color: #fff;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 0 4px rgba(0,0,0,0.6);
  border: 2px solid #fff;
  position: relative; 
}

.compact-action-btn {
  width: 80px;
  height: 40px;
  font-size: 14px;
  cursor: pointer;
}


.bbr-icon-symbol {
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 12px;
  line-height: 1;
}

.bbr-icon-label {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}
