/*! やじるし | (c) 2025-2026 asamizu | yajirushi.liteside.dev | All rights reserved */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 10px;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

label {
  font-size: 1em;
  color: #333;
  margin-bottom: 5px;
}

.input-row {
  display: flex;
  gap: 8px;
}

input[type="text"] {
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  outline: none;
  width: 100%;
  min-width: 0;
}

button {
  background-color: #4285F4;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #3267D6;
}

button:disabled {
  background-color: #9bb8e8;
  cursor: default;
}

#searchButton {
  white-space: nowrap;
}

.hint {
  font-size: 0.8em;
  color: #888;
  margin: 4px 0 0;
  line-height: 1.6;
}

.hint summary {
  cursor: pointer;
}

.hint ul {
  margin: 6px 0 0;
  padding-left: 1.2em;
}

/*
   このページは地図に何も重ねていないので z-index を持たせていない。
   重ねるものを足すときは注意: Leafletのコントロールの入れ物
   （.leaflet-top / .leaflet-bottom、右上の地図切り替えもここ）には
   Leaflet側のCSSで **z-index: 1000** が付いている。それより小さいと隠れる。
   → 順序の一覧は css/index.css の #menuOverlay のコメント
*/
#map {
  width: 100%;
  height: 360px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#address {
  font-size: 0.9em;
  color: #333;
  margin: 0;
  text-align: center;
  word-break: break-all;
  min-height: 1.3em;
}

.result {
  width: 100%;
  text-align: center;
}

.link-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#generatedLink {
  display: inline-block;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  word-break: break-all;
  max-width: 450px;
}

#generatedLink:hover {
  background: #e0e0e0;
}

.share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.share-buttons button {
  padding: 8px 15px;
  font-size: 14px;
}

.share-buttons button.line {
  background-color: #06c755;
}

.share-buttons button.line:hover {
  background-color: #05a344;
}

/* 中身が空なら場所も取らない。JSは文言を入れ替えるだけでよくなる
   （index.html の #error と同じ考え方） */
.error, .success {
  font-size: 0.9em;
  margin-top: 5px;
}

.error {
  color: red;
}

.success {
  color: green;
}

.error:empty, .success:empty {
  display: none;
}

/* リンクが出来てから出す。表示の切り替えは js/maplink.js の setTarget() */
#shareArea {
  display: none;
}

@media (max-width: 600px) {
  input[type="text"] {
    font-size: 14px;
  }

  button {
    padding: 8px 15px;
    font-size: 14px;
  }

  #map {
    height: 300px;
  }

  #generatedLink {
    max-width: 200px;
  }

  .share-buttons button {
    padding: 6px 12px;
    font-size: 12px;
  }
}
