/* Google Fonts - DM Sans */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

#map-container {
  display: flex;
  height: 800px;
  background: #f7f5ee;
  font-family: 'DM Sans', sans-serif;
}

#sidebar {
  padding: 0 10px;     
  width: 350px;
  overflow-y: auto;
  padding-top: 0;
  background: #ffffff;
  color: #1a1a1a;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
}

#sidebar button {
  width: 100%;
  padding: 10px;
  background: #eb5b25;
  color: white;
  border: none;
  border-radius: 5px;
  margin-bottom: 15px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
}

#search-box,
#filter-category {
  padding: 20px 0;
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
}

#dealer-list {
  margin-top: 5px 15px;
}

.dealer-popup,
.dealer-box {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
}

.dealer-name {
  color: #eb5b25;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.dealer-address {
  margin-bottom: 6px;
}

.dealer-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.dealer-line a {
  color: #1a1a1a;
  text-decoration: none;
}

.icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
}

/* === Custom SVG icons (kan byttes ut med egne ikoner hvis ønskelig) === */
.phone-icon {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23eb5b25" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22 16.92v3a2 2 0 0 1-2.18 2A19.86 19.86 0 0 1 3 5.18 2 2 0 0 1 5 3h3a2 2 0 0 1 2 1.72c.13 1.23.46 2.42 1 3.54a2 2 0 0 1-.45 2.11L9.91 11.09a16 16 0 0 0 4 4l.72-.72a2 2 0 0 1 2.11-.45 13.6 13.6 0 0 0 3.54 1A2 2 0 0 1 22 16.92z"/></svg>');
}


.email-icon {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23eb5b25" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M216,48H40A16,16,0,0,0,24,64V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48Zm-8.47,16L128,128.91,48.47,64ZM40,192V74.57l85.34,71.57a8,8,0,0,0,10.32,0L216,74.57V192Z"/></svg>');
}

.web-icon {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23eb5b25" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M232,128A104,104,0,1,0,128,232,104.12,104.12,0,0,0,232,128ZM80.25,200a95.86,95.86,0,0,1-23.27-56H72a151.41,151.41,0,0,0,8.25,56ZM72,112H56.98a95.86,95.86,0,0,1,23.27-56A151.41,151.41,0,0,0,72,112Zm56-40a135.49,135.49,0,0,1,24.25,40H103.75A135.49,135.49,0,0,1,128,72Zm-24.25,56h48.5A135.49,135.49,0,0,1,128,168,135.49,135.49,0,0,1,103.75,128ZM152.22,56a95.86,95.86,0,0,1,23.27,56H184a151.41,151.41,0,0,0-8.25-56ZM184,144h15.02a95.86,95.86,0,0,1-23.27,56A151.41,151.41,0,0,0,184,144Z"/></svg>');
}

#sidebar button {
  width: 100%;
  padding: 10px;
  background: #eb5b25;
  color: white;
  border: none;
  border-radius: 5px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
}

#sidebar button:hover {
  background: #d44f1f;
}

#sidebar .zoom-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

#sidebar .zoom-controls button {
  flex: 1;
  background: #ccc;
  color: #000;
}

.sticky-search {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
  padding: 10px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dealer-box {
  padding: 12px;
  margin-bottom: 12px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.dealer-box:hover {
  transform: scale(1.02);
}

.dealer-box strong {
  color: #eb5b25;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}

#map {
  flex: 1;
}

.toggle-sidebar-btn {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 15px;
  background: #eb5b25;
  color: white;
  border: none;
  border-radius: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.dealer-highlight {
  background-color: #d1f5d3;
  transition: background-color 0.3s ease;
}

/* === MOBIL-VISNING === */
@media (max-width: 768px) {
   #map-container {
    display: flex;
    flex-direction: column;
    height: 140vh;
  }

  #map {
    height: 50vh !important;
    order: 0;
  }

  #sidebar {
    height: 90vh;
    overflow-y: auto;
    order: 1;
    padding-top: 0;
  }
   .sticky-search {
    padding: 10px 15px;
  }
}