
/* === General Page Styling === */
body, html {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  width: 100%;
  height: 100%;
}

/* === Slider Styling === */
input[type="range"] {
  width: 100%;
  appearance: none;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #35868a;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #35868a;
  cursor: pointer;
}

/* === Button Styling === */
button {
  display: block;
  width: 100%;
  margin: 1px auto;
  font-size: 18px;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background-color: #35868a;
  color: white;
  font-weight: bold;
}
button:hover {
  background-color: #0d383a;
}


/* === Tab Styling === */
.tab-buttons {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  flex-wrap: nowrap; /* ❗ Förhindrar radbyte */
  overflow-x: auto;   /* Gör att det scrollar om det blir trångt */
  -webkit-overflow-scrolling: touch;
}

.tab-buttons button {
  flex: 1 1 auto;
  min-width: 90px;
  text-align: center;
  padding: 2px 0;
  background: #f0f0f0;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}


.tab-buttons button.active {
  background: #00796b;
  color: #fff;
}

.tab-content {
  display: none;
  margin-top: 5px;
}
.tab-content.active {
  display: block;
}

/* === Controls Panel === */
.controls {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.30);
  padding: 10px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-sizing: border-box;
}


label, select, input, button {
  width: 100%;
  margin-bottom: 10px;
}

/* === Map Point Styling === */
.start-point, .end-point, .route-point {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #000;
  background-color: #fff;
}
.start-point {
  background-color: green;
}
.end-point {
  background-color: red;
}
.route-point {
  background-color: blue;
}

/* === Modal Styling === */
#confirmModal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}
#confirmModal .modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
  text-align: center;
}
#map {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.container {
  margin: 120px auto 40px;
  background: rgba(255, 255, 255, 0.808);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  width: 90%;
  max-width: 800px;
  text-align: left;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}




.container img.logo {
  max-width: 100px;
  height: auto;
  margin-bottom: 1px;
}

.container button {
  display: inline-block;
  margin: 5px 10px;
  text-decoration: none;
  background-color: #35868a;
  color: white;
  font-weight: bold;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.container button:hover {
  background-color: #2a6f71;
}

#click-map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 0;
}
#search-form {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 5;
  text-align: center;
  max-width: 90%;
}

#search-input {
  padding: 8px;
  font-size: 16px;
  margin-bottom: 8px;
  width: 80%;
  max-width: 400px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#use-location,
#animate-button {
  margin: 5px;
  padding: 10px 20px;
  background-color: #35868a;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

#use-location:hover,
#animate-button:hover {
  background-color: #2a6f71;
}

#instructions {
  font-weight: bold;
  margin-bottom: 10px;
}

#suggestions li {
  background: white;
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #ccc;
}

#suggestions li:hover {
  background: #f0f0f0;
}

#downloadLink {
  display: none;
}
#controlsPanel.hidden {
  display: none !important;
}

.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .tab-buttons button {
    flex: 1 1 48%;
    font-size: 13px;
  }
}
@media (max-width: 768px) {
  .only-desktop {
    display: none !important;
  }
}


#logo {
  margin: 0 auto;
  margin-top: 5px;
  text-align: center;
  flex: 1;
}

#logo img {
  max-height: 60px;
  margin: 0 auto;
  display: block;
}

  .controls button {
    font-size: 16px;
    padding: 14px;
    width: 100%;
    max-width: 100%;
  }

.button-group {
  display: flex;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
}

.button-group button {
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;         /* 🔧 Lägg till detta */     /* 🔧 Lägg till detta också om du vill ha konsekvent bredd */
}
label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

label input[type="range"],
label select {
  flex: 1;
  max-width: 180px;
}
#progressBar {
  width: 100%;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #eee;
  appearance: none;
}
#progressBar::-webkit-progress-bar {
  background-color: #eee;
  border-radius: 8px;
}
#progressBar::-webkit-progress-value {
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 8px;
}
#progressBar::-moz-progress-bar {
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 8px;
}

  /* Visa alltid full attribution */
  .mapboxgl-ctrl-attrib.mapboxgl-compact {
    display: none !important;
  }

  .mapboxgl-ctrl-attrib:not(.mapboxgl-compact) {
    display: block !important;
  }
/* Allmän stil */
body {
  margin: 0;
  font-family: sans-serif;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.068); /* genomskinlig */
  backdrop-filter: blur(1px);
}



.navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: transparent;
  padding: 0.5rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Navigeringslänkar */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

/* Hamburgermenyn */
.nav-toggle {
  display: none;
}

/* Hamburgarens grundstil */
.nav-toggle-label {
  display: block;
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.nav-toggle-label span {
  top: 9px;
}

.nav-toggle-label span::before {
  content: '';
  top: -8px;
}

.nav-toggle-label span::after {
  content: '';
  top: 8px;
}

/* Animerat kryss när hamburgarmenyn är öppen */
.nav-toggle:checked + .nav-toggle-label span {
  background-color: transparent;
}

.nav-toggle:checked + .nav-toggle-label span::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle:checked + .nav-toggle-label span::after {
  transform: rotate(-45deg);
  top: 0;
}
@media (min-width: 769px) {
  .nav-toggle-label {
    display: none;
  }
}


/* Mobil */
@media (max-width: 768px) {
  .nav-toggle-label {
    display: block;
    position: absolute;
    top: 1.25rem;
    right: 2rem;
  }

  nav {
    flex: 1;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.384);
    width: 100%;
    text-align: center;
    display: none;
  }

  .nav-toggle:checked + .nav-toggle-label + nav {
    display: block;
  }

nav ul {
  list-style: none;
  display: inline-flex; /* istället för flex */
  gap: 1rem;
  margin: 0 auto;
  padding: 0;
}

  nav ul li {
    margin: 1rem 0;
  }
}

/* === Breadcrumb Styling === */
.breadcrumb-container {
  text-align: center;
  padding: 5px 0;
  font-size: 14px;
  color: #555;
}
.breadcrumb {
  display: inline-flex;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumb li::after {
  content: ">";
  margin: 0 5px;
}
.breadcrumb li:last-child::after {
  content: "";
}
.breadcrumb a {
  text-decoration: none;
  color: #0078a8;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
h1.custom-heading {
  font-size: 1.5em;
  color: #00796b;
  margin-bottom: 0.5em;
}

h2.custom-heading {
  font-size: 1em;
  color: #00796b;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
}

.contact-form label {
  font-weight: bold;
  margin-top: 10px;
  display: block;
  color: #333;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
  margin-bottom: 15px;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
   background-color: rgba(255, 255, 255, 0.85);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

#form-result {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  background-color: #e6f4ea;
  color: #2a6f71;
  font-weight: bold;
  font-size: 16px;
}
.hidden {
  display: none;
}
