
:root {
  --main-clr: rgb(170, 32, 22);
  --main-clr-shadow: rgba(170, 32, 22, 0.5);
  --sub-clr: rgb(248, 197, 101);
  --sub-clr-shadow: rgba(248, 197, 101, 0.5);
}

html, body {
  min-height: 100vh;
  min-width: 100vw;
  margin: 0;
  overflow: hidden;
  font-family: "Noto Sans JP", sans-serif;
}

header {
    background-color: var(--main-clr);
    color: white    ;
}

div#map *, div#ZMap * {
  box-sizing: border-box  ;
  /* box-sizing: content-box; */
}

#map, #ZMap {
  max-width: 100%;
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

button, select, input {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-size: 14px;
  transition: background 0.3s;
}

#map-type {
  position: absolute;
  left: 10px;
  z-index: 1;
  top: 10px;
}

#result-list div:hover {
  background-color: #ffe5e0;
  cursor: pointer;
  /* background: #f0f0f0; */
}

#search-box {
  width: 20%;
  min-width: 160px;
}

#btn_location img{
    transform: rotate( 45deg );
    padding-bottom: 3px;
    width: 18px;
    height: 18px;
}

#print_menu {
  display: flex;
}

.popup-table {
  font-size: 13px;
  border-collapse: collapse;
  width: 100%;
}

.popup-table td {
  padding: 4px 6px;
  /* border-bottom: 1px solid #ddd; */
}

.maplibregl-popup-tip {
  border-top-color: #ff9800 !important;
}

.maplibregl-popup-content {
  background: #fff0d5;
  color: #222;
  border-left: 6px solid #ff9800;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  padding: 20px 10px 10px 6px;
  font-size: 15px;
}

.maplibregl-popup-content table tr > td:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px; /* 必要に応じて幅を調整 */
  font-weight: bold;
}


#template-modal_block {
  font-size: 90%;
}

#template-modal_block ul {
  padding-left: 2em;
}

#template-modal_block ol {
  counter-reset: cnt;
  padding-left: .5em;
}

#template-modal_block ol li {
  list-style-type: none;
}

#template-modal_block ol li:before {
  counter-increment: cnt;
}

#template-modal_block .level1 > li {
  padding-bottom: .5em;
}

#template-modal_block .level1 > li:before {
  content:'第 ' counter(cnt) ' 条';
}

#template-modal_block .level2 li {
  position: relative;
  padding-inline-start: 1.5em;
}

#template-modal_block .level2 li:before {
  position: absolute;
  left: 0;
}

#template-modal_block .level2 > li:before {
  content: counter(cnt) '.';
}

#template-modal_block ol.level3 {
  padding-left: .5em;
}

#template-modal_block .level3 li {
  padding-inline-start: 2em;
}

#template-modal_block .level3 > li:before {
  content: '(' counter(cnt) ')';
}

#search-container {
  position: absolute;
  top: 50px;
  left: 10px;
  z-index: 1;
  width: 75vw;
}

.search-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

#result-list {
  background: white;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow: auto;
  width: 200px;
  margin-top: 4px;
}


#btn_clear_result {
  white-space: nowrap;
}

.btn-print-tate,
.btn-print-yoko {
    width: 60px;
    height: 60px;
}
.btn-print-tate img,
.btn-print-yoko img {
    position: absolute; 
    width: 60px; 
    left: 0; 
}
.btn-print-tate img {
    transform: scale(-1, 1);
}
.btn-print-yoko img {
    transform: rotate(90deg);
}
.btn-print-tate div,
.btn-print-yoko div {
    font-size: 30px; 
    font-weight: bold; 
    line-height: 30px;
}
.btn-print-tate div {
    right: 15px; 
    bottom: 5px; 
}
.btn-print-yoko div {
    right: 8px; 
    bottom: 12px; 
}

.btn-group .btn {
  background-color: white;
  /* border-color: rgb(220, 120, 22);
  color: rgb(220, 120, 22); */
  border-color: var(--main-clr);
  color: var(--main-clr);
}

.btn-group .btn.hover {
  background-color: var(--main-clr);
  /* background-color: rgb(220, 120, 22); */
  color: rgb(240, 220, 200);
}

.btn-group .btn.active {
  background-color: var(--main-clr);
  /* background-color: rgb(220, 120, 22); */
  color: rgb(240, 220, 200);
}

#previewBtn{
    background-color: var(--main-clr);
    border: none;
}

.maplibregl-popup-close-button {
    box-shadow: none;
}

/* スケールバーのカスタムデザイン */
.maplibregl-ctrl-scale::before {
  content: "距離の目安：";
  font-size: 0.7rem;
  margin-right: 6px;
  font-weight: normal;
}
.maplibregl-ctrl-scale {
  font-size: 0.7rem;
  box-sizing: border-box !important;
}


/* ズームコントロールボタンのスタイル */
#zoom-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#zoom-controls button {
  background-color: var(--main-clr);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: background 0.2s;
}

#zoom-controls button:hover {
  background-color: var(--sub-clr);
  color: var(--main-clr);
}

#template-nav_block li{
  margin-left: auto;
}

#template-nav_block a {
  color: #fff;
  border: 1px solid var(--sub-clr);
  background: rgba(248,197,101,0.15);
  border-radius: 6px;
  padding: 4px 12px;
  margin-right: 8px;
  text-decoration: none;
  font-size: 0.9em;
  transition: background 0.2s, color 0.2s;
}

#template-nav_block a:hover {
  background: var(--sub-clr);
  color: var(--main-clr);
}

#navbarSupportedContent {
  display: flex;
  flex-basis: auto;
}

#confirm-dialog {
  display:none; 
  position:fixed; 
  top:0; 
  left:0; 
  width:100%; 
  height:100%; 
  background:rgba(0,0,0,0.4); 
  z-index:9999  
}

#confirm-dialog .modal-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  width: 70vw;
  max-width: 900px;
  min-width: 300px;
  height: 85vh;
  max-height: 95vh;
  overflow-y: auto;
  margin: auto;
}

#confirm-dialog .modal-content {
  height: 100%;
}

@media (max-width: 490px) {
  #zoom-controls {
    top: 100px;
  }
  .btn-group {
    right: 10px !important;
  }
}

@media (max-width: 600px) {
  #confirm-dialog .modal-dialog {
    width: 98vw;
    min-width: unset;
    max-width: 100vw;
    height: 96vh;
    max-height: 98vh;
    padding: 8px;
    border-radius: 0; /* 四隅丸みをなくして画面いっぱい感 */
    font-size: 1rem;
  }
  #confirm-dialog .modal-content {
    font-size: 0.97em;
  }
  #confirm-dialog .modal-body {
    height: 55vh;
    max-height: 60vh;
    overflow-y: auto;
  }
  #confirm-dialog .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  #confirm-dialog .modal-footer button {
    margin-top: 8px;
    width: 100%;
  }
}

/* タブレット向け */
@media (min-width: 601px) and (max-width: 1024px) {
  #confirm-dialog .modal-dialog {
    width: 80vw;
    min-width: unset;
    max-width: 96vw;
    height: 92vh;
    max-height: 94vh;
    padding: 12px;
    font-size: 1.07em;
  }
  #confirm-dialog .modal-content {
    font-size: 1em;
  }
  #confirm-dialog .modal-body {
    height: 60vh;
    max-height: 65vh;
    overflow-y: auto;
  }
}