/* ---- GPS記録ダイアログ：全体はリサイズ可能＆画面が低くてもスクロールで届く ---- */
.gsi_gpstrack_dialog {
  display: flex;
  flex-direction: column;
}
.gsi_gpstrack_dialog .gsi_dialog_content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gsi_gpstrack_dialog_frame {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  max-height: calc(100vh - 140px);
  font-size: 9.5pt;
}

.gsi_gpstrack_caption {
  font-weight: bold;
  margin: 8px 0 4px 0;
  font-size: 9.5pt;
  color: #333;
}
.gsi_gpstrack_caption:first-child { margin-top: 0; }

.gsi_gpstrack_postext {
  margin: 2px 0 10px 0;
  color: #333;
  font-size: 9pt;
}

.gsi_gpstrack_btnrow {
  margin-bottom: 8px;
}
.gsi_gpstrack_btn {
  width: 100%;
  padding: 8px 4px;
  font-size: 9.5pt;
  border: 1px solid #2B7396;
  border-radius: 4px;
  background: #eef6f9;
  color: #205267;
  cursor: pointer;
}
.gsi_gpstrack_btn:hover { background: #dcedf2; }
.gsi_gpstrack_btn:disabled { opacity: 0.6; cursor: default; }

.gsi_gpstrack_btn_track.gsi_gpstrack_btn_recording {
  background: #fdecec;
  border-color: #c0392b;
  color: #a5281c;
}

.gsi_gpstrack_trackstatus {
  margin: -2px 0 10px 0;
  padding: 4px 6px;
  background: #fff6f6;
  border: 1px solid #f0c9c9;
  border-radius: 3px;
  font-size: 8.5pt;
  color: #a5281c;
}

.gsi_gpstrack_exportrow {
  font-size: 8.5pt;
  margin-bottom: 4px;
}
.gsi_gpstrack_exportrow a {
  color: #2B7396;
  text-decoration: underline;
}

.gsi_gpstrack_list {
  max-height: 130px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 2px 6px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.gsi_gpstrack_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
  font-size: 8.5pt;
}
.gsi_gpstrack_row:last-child { border-bottom: none; }
.gsi_gpstrack_row_label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 6px;
}
.gsi_gpstrack_row_action {
  margin-left: 6px;
  color: #2B7396;
  text-decoration: underline;
  white-space: nowrap;
}

/* ---- ポイント行：複数行になるので通常のブロック表示に ---- */
.gsi_gpstrack_point_row {
  display: block;
}
.gsi_gpstrack_point_row .gsi_gpstrack_row_label {
  display: block;
  white-space: normal;
  font-weight: bold;
}
.gsi_gpstrack_point_note {
  color: #555;
  margin: 2px 0;
  white-space: pre-wrap;
}
.gsi_gpstrack_point_thumb {
  max-width: 100%;
  max-height: 90px;
  display: block;
  margin: 4px 0;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid #ddd;
}
.gsi_gpstrack_point_actions {
  margin-top: 2px;
}
.gsi_gpstrack_point_actions .gsi_gpstrack_row_action {
  margin-left: 0;
  margin-right: 10px;
}

/* ---- 地図上の常時表示ラベル ---- */
.gsi_gpstrack_marker_label {
  font-size: 8.5pt;
  font-weight: bold;
  padding: 1px 5px;
  background: rgba(255,255,255,0.9);
  border: 1px solid #c0392b;
  color: #a5281c;
  border-radius: 3px;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
}
.gsi_gpstrack_marker_label::before {
  border-top-color: #c0392b;
}

/* ---- ポイントをタップした時の操作パネル ---- */
.gsi_gpstrack_popup_wrap .leaflet-popup-content {
  margin: 10px 12px;
}
.gsi_gpstrack_popup_wrap .leaflet-popup-content-wrapper {
  border-radius: 6px;
}
.gsi_gpstrack_popup {
  font-size: 9pt;
  width: 100%;
  box-sizing: border-box;
}
.gsi_gpstrack_popup_title {
  font-weight: bold;
  font-size: 10pt;
  margin-bottom: 4px;
}
.gsi_gpstrack_popup_note {
  color: #555;
  white-space: pre-wrap;
  margin-bottom: 4px;
}
.gsi_gpstrack_popup_thumb {
  max-width: 100%;
  max-height: 120px;
  display: block;
  margin-bottom: 6px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid #ddd;
}
.gsi_gpstrack_popup_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.gsi_gpstrack_popup_btn {
  flex: 1 1 calc(33% - 5px);
  min-width: 70px;
  padding: 7px 4px;
  font-size: 8.5pt;
  border: 1px solid #2B7396;
  border-radius: 3px;
  background: #eef6f9;
  color: #205267;
  cursor: pointer;
}
.gsi_gpstrack_popup_btn:hover { background: #dcedf2; }
.gsi_gpstrack_popup_btn_danger {
  border-color: #c0392b;
  background: #fdecec;
  color: #a5281c;
}

.gsi_gpstrack_empty {
  padding: 6px 0;
  color: #999;
  font-size: 8.5pt;
}

/* ---- 地図上のポイントマーカー ---- */
.gsi_gpstrack_pointicon_inner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c0392b;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.gsi_gpstrack_pointicon_unlocked .gsi_gpstrack_pointicon_inner {
  background: #f39c12;
  box-shadow: 0 0 0 4px rgba(243,156,18,0.35);
}

/* ---- 写真ポイント用アイコン（カメラマーク） ---- */
.gsi_gpstrack_photoicon_inner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2c6fbb;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}

/* ---- 写真ポイント一覧セクションの見出し ---- */
.gsi_gpstrack_photofolder_header {
  background: #eaf1fa;
}
.gsi_gpstrack_photo_vis_toggle {
  margin-left: auto;
  font-weight: normal;
  font-size: 8pt;
  color: #555;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

/* ---- 写真ポイント表示切替（常設） ---- */
.gsi_gpstrack_photo_vis_toggle_row {
  display: block;
  font-size: 8.5pt;
  color: #333;
  margin: 2px 0 6px 0;
  cursor: pointer;
}

/* ---- ルートごとの地図表示切替 ---- */
.gsi_gpstrack_track_vis_row {
  display: block;
  font-size: 8pt;
  color: #555;
  margin: 2px 0 4px 0;
  cursor: pointer;
}

/* ---- 位置情報 設定案内ダイアログ ---- */
.gsi_gpstrack_helpframe {
  font-size: 9pt;
}
.gsi_gpstrack_help_reason {
  margin-bottom: 8px;
  color: #a5281c;
}
.gsi_gpstrack_help_steps {
  margin: 0 0 12px 0;
  padding-left: 20px;
}
.gsi_gpstrack_help_steps li {
  margin-bottom: 6px;
  line-height: 1.4;
}
.gsi_gpstrack_help_btnrow {
  display: flex;
  gap: 6px;
}
.gsi_gpstrack_help_btnrow .gsi_gpstrack_btn {
  flex: 1;
}
.gsi_gpstrack_btn_secondary {
  background: #f2f2f2;
  border-color: #bbb;
  color: #555;
}

/* ---- 端末保存のみに関する注記 ---- */
.gsi_gpstrack_notice {
  font-size: 8pt;
  color: #777;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  padding: 5px 7px;
  margin: 2px 0 10px 0;
  line-height: 1.4;
}

/* ---- フォルダ ---- */
.gsi_gpstrack_folder_section {
  margin-bottom: 4px;
}
.gsi_gpstrack_folder_header {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 3px 2px;
  background: #f0f4f6;
  border-radius: 3px;
  font-size: 8.5pt;
  font-weight: bold;
}
.gsi_gpstrack_folder_toggle {
  margin-right: 4px;
  color: #2B7396;
}
.gsi_gpstrack_folder_name {
  flex: 1 1 auto;
}
.gsi_gpstrack_folder_actions {
  font-weight: normal;
}
.gsi_gpstrack_folder_body {
  padding-left: 8px;
}

/* ---- ルート行：エクスポート等は題名の下に ---- */
.gsi_gpstrack_track_row {
  display: block;
}
.gsi_gpstrack_track_row .gsi_gpstrack_row_label {
  display: block;
  white-space: normal;
  font-weight: bold;
  margin-bottom: 2px;
}

/* ---- ポイント編集（プロパティ）ダイアログ ---- */
.gsi_gpstrack_pointdialog {
  display: flex;
  flex-direction: column;
}
.gsi_gpstrack_pointdialog .gsi_dialog_content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gsi_gpstrack_pointdialog_frame {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  max-height: calc(100vh - 140px);
  font-size: 9.5pt;
}
.gsi_gpstrack_field_label {
  display: block;
  font-weight: bold;
  font-size: 8.5pt;
  margin: 8px 0 3px 0;
  color: #333;
}
.gsi_gpstrack_field_label:first-child { margin-top: 0; }
.gsi_gpstrack_field_input,
.gsi_gpstrack_field_textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  font-size: 9.5pt;
  border: 1px solid #ccc;
  border-radius: 3px;
}
.gsi_gpstrack_field_textarea {
  resize: vertical;
}
.gsi_gpstrack_field_hint {
  font-size: 8pt;
  color: #888;
  margin: 4px 0 8px 0;
}
.gsi_gpstrack_checkbox_row {
  display: block;
  font-size: 8.5pt;
  margin: 4px 0 10px 0;
  cursor: pointer;
}
.gsi_gpstrack_photo_preview {
  margin-bottom: 6px;
}
.gsi_gpstrack_photo_preview_img {
  max-width: 100%;
  max-height: 160px;
  display: block;
  border-radius: 3px;
  border: 1px solid #ddd;
  cursor: pointer;
}
.gsi_gpstrack_photo_btnrow {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.gsi_gpstrack_photo_btnrow .gsi_gpstrack_btn {
  flex: 1;
}
.gsi_gpstrack_pointdialog_btnrow {
  margin-top: 10px;
}
.gsi_gpstrack_btn_danger {
  border-color: #c0392b;
  background: #fdecec;
  color: #a5281c;
}
