/* =========================
   Reset i globalne
========================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* =========================
   Nagłówek i stopka
========================= */
header, footer {
  background: #f5f5f5;
  padding: 10px 5px;
}

/* =========================
   Kontener języka
========================= */
.lang-switcher-container {
  max-width: 300px;
  margin: 10px auto;
  padding: 12px 20px;
  background-color: #f0f4f8;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-label {
  font-weight: 600;
  color: #333;
  margin-right: 10px;
}

.custom-select select {
  flex: 1;
  padding: 8px 35px 8px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="gray" d="M2 0L0 2h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: all 0.3s;
}

.custom-select select:hover {
  border-color: #888;
}

.custom-select select:focus {
  outline: none;
  border-color: #2e7d32;
  box-shadow: 0 0 8px rgba(46,125,50,0.4);
}

/* =========================
   Główna sekcja
========================= */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
  padding: 10px;
}

/* Informacja o dodaniu punktu */
#addPointInfo {
  flex: 1 1 100%;
  padding: 15px;
  background: #e0f7fa;
  text-align: center;
  margin-bottom: 20px;
  border-radius: 10px;
  line-height: 1.5;
}

/* Sekcja o Camper Map */
#about {
  padding: 15px;
  background: #e0f7fa;
  border-radius: 10px;
  margin-bottom: 20px;
}

#about h2 {
  text-align: center;
  margin-bottom: 10px;
}

.about-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.about-card {
  flex: 1 1 280px;
  max-width: 300px;
  background: #fff;
  padding: 12px;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  text-align: justify;
}

.about-card h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  line-height: 1.3em;
}

.about-card p {
  margin: 0 0 6px 0;
  font-size: 14px;
  line-height: 1.4em;
}

/* =========================
   Mapa
========================= */
#mapContainer {
  width: 100%;
  position: relative;
  height: 70vh; /* 75% wysokości okna */
  max-height: 70vh; /* dodatkowe zabezpieczenie */
  border-radius: 10px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  position: relative;
}

/* =========================
   Panel filtrów Leaflet
========================= */
#compactFilterPanel {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.95);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1000;
}

#compactFilterPanel label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  cursor: pointer;
}

#compactFilterPanel input[type="checkbox"] {
  transform: scale(0.9);
  cursor: pointer;
}

/* =========================
   Bannery / Logo
========================= */
.banner-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 10px 0;
  background: #fff;
  padding: 5px;
  border-radius: 8px;
}

.banner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex: 1 1 100px;
}

.banner-img {
  max-width: 90%;
  max-height: 60px;
  height: auto;
  width: auto;
  display: block;
  object-fit: contain;
}

/* =========================
   Formularze
========================= */
#formContainer input,
#formContainer select,
#formContainer textarea,
#formContainer button {
  display: block;
  margin: 5px auto;
  padding: 8px;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
}

#formContainer button {
  cursor: pointer;
  background: #2e7d32;
  color: white;
  border: none;
  border-radius: 5px;
  transition: background 0.2s;
}

#formContainer button:hover {
  background: #1b5e20;
}

/* =========================
   InfoWindow Google Maps
========================= */
.gm-style-iw {
  width: auto !important;
  max-width: 250px !important;
  max-height: 90vh !important;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 5px;
}

.gm-style-iw div {
  overflow-wrap: break-word;
}

/* Tymczasowy modal/overlay */
#tempModal {
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 95vw;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  padding: 10px;
  z-index: 9999;
}

/* Podświetlenie wybranych ikon udogodnień */
.amenity-icon.selected {
  border: 2px solid green;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* =========================
   Responsywność
========================= */
@media (max-width: 768px) {
  main {
    flex-direction: column;
  }

  #formContainer, #mapContainer {
    flex: 1 1 100%;
    min-height: 300px;
  }

  .about-cards {
    flex-direction: column;
    gap: 12px;
  }

  #addPointInfo {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .banner-container {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .banner {
    width: 100%;
    margin-bottom: 8px;
  }

  .banner-img {
    max-width: 150px;
    max-height: 50px;
  }

  .lang-switcher-container {
    max-width: 95%;
    margin: 5px auto;
    padding: 10px 12px;
  }

  #mapContainer {
    height: calc(100vh - 100px);
  }

  .about-card {
    flex: 1 1 95%;
    max-width: 95%;
    padding: 10px;
    font-size: 13px;
  }

  .about-card h3 {
    font-size: 14px;
  }

  .about-card p {
    font-size: 12px;
    line-height: 1.4em;
  }
body, input, textarea {
  -webkit-user-select: none; /* Safari/Chrome */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE10+ */
  user-select: none;         /* standard */
}
.hidden {
  visibility: hidden;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: height 0.3s ease, visibility 0.3s;
}
.visible {
  visibility: visible;
  height: auto;
  pointer-events: auto;
  transition: height 0.3s ease, visibility 0.3s;
}


.leaflet-popup-content {
    transition: none !important;
}

#amenitiesDiv, #amenities2Div {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

.arrow {
  color: #007bff; /* niebieski bootstrap */
  font-weight: bold;
  
  
  
  
  
  
}
/* === FOOTER TERMS BOX - nowa wersja === */
#footerTerms {
  text-align: center; /* centrum dla całego kontenera */
  margin: 30px auto;
  max-width: 700px;
}


/* Strzałka obracana przy otwarciu */
.footer-summary .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.footer-box[open] .footer-summary .arrow {
  transform: rotate(90deg);
}

/* Treść rozwijana */
.footer-content {
  margin-top: 12px;
  color: #eee;
  text-align: left; /* treść w środku może być wyrównana do lewej */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.footer-box[open] .footer-content {
  max-height: 1000px;
}

}