.searchPage {
  padding-top: 90px;
}

fieldset {
  border: none;
}

.searchForm__header {
  box-sizing: border-box;
  margin: 0 40px;
  padding: 0 0 34px;
  position: relative;
  text-align: center;
}

.searchForm__headerImg.left {
  align-self: flex-end;
  bottom: 0;
  left: 0;
  position: absolute;
  width: clamp(80px, 8.1vw, 116px);
}

.searchForm__headerImg.right {
  bottom: 0;
  position: absolute;
  right: -20px;
  width: clamp(162px, 13.5vw, 194px);
}

.searchForm__title {
  align-content: center;
  justify-items: center;
}

.searchForm__title h2,
.searchForm__title p {
  color: #333;
  font-family: var(--fontNotoSansJP);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
}

.searchForm__title p {
  font-size: var(--fontMax21Min16);
  margin-top: 11px;
  position: relative;
}

.searchForm__title p::before {
  background: url(../images/common/icon-dashes.svg) no-repeat center / cover;
  bottom: -3px;
  content: "";
  height: 25px;
  left: -32px;
  position: absolute;
  width: 16px;
}

.searchForm__title p::after {
  background: url(../images/common/icon-dashes.svg) no-repeat center / cover;
  bottom: -3px;
  content: "";
  height: 25px;
  position: absolute;
  right: -32px;
  transform: scaleX(-1);
  width: 16px;
}

/* Search Form Main */

.searchForm__main {
  margin: 4px auto 0;
  max-width: 860px;
}

.searchForm__heading {
  background: var(--colorGreenSearch);
  border-radius: 100px;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--fontSize24);
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 10px 0;
  text-align: center;
  width: 100%;
}

.searchForm__heading.hasMargin {
  margin-top: clamp(62px, 5.8vw, 80px);
}

.searchFormDisplay {
  background: #fff;
  border: 2px solid #333;
  border-radius: 10px;
  box-sizing: border-box;
  margin-top: 72px;
  padding: 40px;
  position: relative;
}

.searchForm__nav {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
  left: 50%;
  position: absolute;
  top: -48px;
  transform: translateX(-50%);
  width: calc(100% - 80px);
  z-index: 2;
}

.searchForm__navButton {
  align-items: center;
  background: #d7d7d7;
  border: 2px solid #333;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  display: flex;
  gap: 8px;
  height: 48px;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: 0s;
  width: 100%;
}

.searchForm__navButton.active {
  background: #fff;
  position: relative;
  transform: translateZ(0);
}

.searchForm__navButton svg path {
  fill: #333;
}

.searchForm__navButton.active svg path {
  fill: var(--colorGreenSearch);
}

/* .searchForm__navButton.active::after {
  background: #fff;
  bottom: -2px;
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 100%;
} */

.searchForm__navButton p {
  color: #333;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 400;
}

.searchForm__navButton.active p {
  color: var(--colorGreenSearch);
}

.searchForm__navButton p .large {
  font-size: var(--fontSize18);
}

.searchForm__navButton.active p .large {
  font-weight: 700;
}

.searchForm__trainIcon,
.searchForm__mapPointer {
  display: flex;
  position: relative;
  top: 1px;
}

.searchForm__mapPointer {
  max-width: 13px;
}

.searchForm__trainIcon {
  max-width: 15px;
}

.mapDisplay.hidden,
.stationDisplay.hidden {
  display: none;
}

.mapDisplay__title {
  color: #333;
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--fontSize18);
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.mapImage {
  background: url(../images/search/img-search_display_bg.png) repeat;
  background-size: 10px;
  box-sizing: border-box;
  margin-top: 40px;
  padding: 40px 20px 20px;
  position: relative;
}

.allAreas {
  background: #fff;
  border: 1px solid #333;
  border-radius: 100px;
  box-sizing: border-box;
  color: #333;
  cursor: pointer;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 700;
  left: 2.56%;
  line-height: 1;
  padding: 10px 16px;
  position: absolute;
  text-align: center;
  top: 2.56%;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.allAreas.active {
  background: var(--colorGreenSearch);
  border-color: var(--colorGreenSearch);
  color: #fff;
}

.allAreas.hidden {
  opacity: 0;
  visibility: hidden;
}

.otherAreas {
  background: transparent;
  border: none;
  bottom: 2.56%;
  color: #333;
  cursor: pointer;
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--fontSize15);
  font-weight: 700;
  margin: 0;
  padding: 0;
  position: absolute;
  right: 2.56%;
  text-decoration: underline;
  text-decoration-color: #333;
  transition: all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.otherAreas:hover {
  color: var(--colorGreenSearch);
  text-decoration-color: var(--colorGreenSearch);
}

.otherAreas.hidden {
  opacity: 0;
  visibility: hidden;
}

.mapImage__svgContainer {
  padding: 30px;
  text-align: center;
}

.mapImage__svgContainer:has(svg.hasNoPad) {
  padding: 0;
}

.mapImage__svgContainer:has(svg.tokyoArea) {
  padding: 35px;
}

.mapImage__svgContainer svg {
  height: auto;
  max-width: 100%;
  width: auto;
}

.mapImage__svgContainer svg .js-area {
  cursor: pointer;
  transition: fill 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.mapImage__svgContainer svg .js-area:hover {
  fill: #269844;
}

.mapImage__svgContainer svg .js-area.active {
  fill: #0f802d;
}

.mapImage__svgContainer svg path:not(.js-area) {
  pointer-events: none;
}

.textForArea1,
.textForArea2,
.textForArea3 {
  transition: fill 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);;
}

.mapImage__svgContainer svg:has(.areaText1.active) .textForArea1,
.mapImage__svgContainer svg:has(.areaText2.active) .textForArea2,
.mapImage__svgContainer svg:has(.areaText3.active) .textForArea3 {
  fill: #fff;
}

.mapSelected {
  margin-top: 30px;
}

.mapSelected.hidden {
  display: none;
}

.mapSelected__title {
  color: #333;
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--fontSize16);
  font-weight: 700;
  line-height: 1.5;
}

.mapSelected__nav {
  display: flex;
  gap: 30px;
  margin-top: 12px;
}

.mapSelected__nav.hidden {
  display: none;
}

.mapSelected__button,
.mapSelected__current {
  background: none;
  border: none;
  color: var(--colorGreenSearch);
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--fontSize15);
  font-weight: 400;
  line-height: 1;
  margin: 0;
  padding: 0;
  position: relative;
  text-decoration: underline;
}

.mapSelected__current {
  color: #333;
  text-decoration: none;
}

.mapSelected__button {
  cursor: pointer;
}

.mapSelected__button::after {
  border-bottom: 1px solid #333;
  border-right: 1px solid #333;
  content: "";
  height: 6px;
  position: absolute;
  right: -17px;
  top: 4px;
  transform: rotate(-45deg);
  width: 6px;
}

.mapSelected__area {
  left: 3.6%;
  position: absolute;
  top: 4.6%;
  transition: all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.mapImage .mapSelected__area.otherRegions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  left: 50px;
  max-width: calc(100% - 100px);
  top: 30px;;
}

.otherRegionsDisplaySpace,
.regionDisplaySpace {
  display: block;
  height: 400px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.215, 0.610, 0.355, 1);
  width: 100%;
}

.regionDisplaySpace {
  display: none;
}

.mapSelected__area.otherRegions p:first-child {
  width: 100%;
}

.mapSelected__area p {
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--fontSize14);
  font-weight: 700;
  line-height: 1.7;
}

.mapSelected__area p .large {
  font-size: var(--fontMax21Min16);
}

.mapImage:has(svg.tokyoArea) .mapSelected__area p .large {
  font-size: 17px;
}

.mapSelected__area p .medium {
  font-size: 16px;
}

.mapSelected__area.hidden {
  opacity: 0;
  visibility: hidden;
}

.searchForm__group {
  margin-top: 16px;
}

.searchForm__group.first {
  margin-top: 24px;
}

.searchForm__selectArea input[type="checkbox"],
.stationSingle input[type="checkbox"] {
  cursor: pointer;
  opacity: 0;
}

.searchForm__selectArea label,
.searchForm__label,
.stationSingle label,
.station__heading {
  color: #333;
  cursor: pointer;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  grid-template-columns: 24px auto;
  line-height: 1.4;
  padding-left: 0;
  position: relative;
}

.searchForm__selectArea label {
  align-items: center;
}

.searchForm__label,
.stationSingle label {
  display: block;
  font-size: 15px;
}

.searchForm__label {
  font-size: 17px;
}

.stationSingle label {
  display: flex;
  font-size: 14px;
  font-weight: 400;
  gap: 6px;
}

.searchForm__selectArea {
  background: #fff;
  border: 2px solid #333;
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 1.6vw, 22px) clamp(25px, 3.1vw, 44px);
  margin-top: 8px;
  padding: clamp(18px, 1.7vw, 24px) clamp(18px, 2.8vw, 40px);
}

.searchForm__selectArea label::before,
.stationSingle label::before {
  background: #fff;
  border: 1px solid #707070;
  content: "";
  height: 15px;
  left: 0;
  position: absolute;
  top: 1px;
  transition: 0.3s ease-in-out;
  width: 15px;
}

/* Value specifically for Firefox */
@-moz-document url-prefix() {
  .searchForm__selectArea label::before {
    top: 0;
  }
}

.searchForm__selectArea label:has(input:checked)::before,
.stationSingle label:has(input:checked)::before {
  background: #2bac4d;
}

.searchForm__selectArea label::after,
.stationSingle label::after {
  background: url(../images/icon-tick_white.svg);
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  height: 7px;
  left: 4px;
  position: absolute;
  top: 6px;
  width: 10px;
}

.searchTopInner {
  box-sizing: border-box;
  padding: 40px 20px;
}

.searchForm__footer {
  margin-top: 40px;
}

.searchForm__error,
.searchForm__count {
  color: #ed0000;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.searchForm__error {
  margin-bottom: 10px;
}

.searchForm__count {
  color: #333;
  font-size: 20px;
}

.searchForm__submit {
  align-items: center;
  background: var(--colorGreenSearch);
  border: none;
  border-radius: 100px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 700;
  height: 54px;
  justify-content: center;
  line-height: 1;
  padding-bottom: 4px;
  transition: background-color 0.4s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.4s ease-in-out;
  width: 100%;
}

.searchForm__submit:not(:disabled):hover {
  opacity: 0.8;
}

.searchForm__submit:disabled {
  background: #b8b8b8;
  cursor: not-allowed;
}

.searchForm__submitWrapper {
  display: block;
  margin: 10px auto 0;
  max-width: 177px;
  position: relative;
  width: 100%;
}

.searchForm__submitWrapper::after {
  background: url(../images/search/icon-search-select.svg) no-repeat center / cover;
  content: "";
  height: 17px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
}

.warningModal {
  background: #f7f7f7;
  border: 1px solid #d7d7d7;
  box-shadow: 0 2px 8px rgba(0,0,0,0.16);
  box-sizing: border-box;
  height: fit-content;
  max-width: 480px;
  opacity: 0;
  padding: 16px;
  pointer-events: none;
  position: absolute;
  top: 25px;
  transform: translateY(40px);
  transition: all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
  visibility: hidden;
  width: 100%;
}

.warningModal.isOpen {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
  visibility: visible;
}

.warningModal.isLeft {
  left: -42px;
}

.warningModal.isRight {
  right: -42px;
}

.warningModal__header {
  display: flex;
  justify-content: space-between;
}

.warningModal__icon {
  display: flex;
  gap: 6px;
}

.warningModal__icon img {
  max-width: 20px;
}

.warningModal__icon p,
.warningModal__body p {
  color: #2d2d2d;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

.warningModal__close {
  align-self: center;
  cursor: pointer;
  height: 18px;
  margin-right: 6px;
  position: relative;
  width: 18px;
}

.warningModal__close span {
  background: #2d2d2d;
  content: "";
  height: 2px;
  left: 50%;
  position: absolute;
  top: 50%;
  width: 18px;
}

.warningModal__close span:first-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.warningModal__close span:last-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.warningModal__body {
  margin-top: 8px;
}

.warningModal__body p {
  font-size: 14px;
  font-weight: 400;
}

.warningModal__button {
  align-items: center;
  background: var(--colorGreenSearch);
  border: none;
  border-radius: 100px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  line-height: 1.6;
  margin: 24px auto 0;
  max-width: 224px;
  width: 100%;
}

.stationDisplay {
  display: grid;
  gap: 27px;
  grid-template-rows: 1fr;
  margin-top: 40px;
}

.stationSingle__inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stationSingle__head {
  border-bottom: 1px solid #707070;
  cursor: pointer;
  padding-bottom: 16px;
}

.stationSingle__head p {
  color: #333;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  position: relative;
}

.stationSingle__head p::after {
  background: url(../images/common/icon-chevron_down.svg) no-repeat center / cover;
  content: "";
  height: 7px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  width: 12px;
}

.isOpen .stationSingle__head p::after {
  transform: translateY(-50%) scaleY(-1);
}

.stationSingle__row {
  display: grid;
  grid-template-columns: 54px auto;
  margin-top: 16px;
}

.stationSingle__fieldset {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(6, 1fr);
}

.station__heading {
  display: block;
  font-size: 14px;
}

.stationSingle__allCheckboxes {
  margin-top: 16px;
}

.stationSingle__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.searchForm__navButton:not(.active) {
  border-bottom: 2px solid #333;
}

.mapImage:has(.allAreas:not(.hidden)) .mapSelected__area {
  top: 68px;
}

.brandGroup label {
  height: fit-content;
  line-height: 1.4;
}

.otherRegionsContainer {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
}

.otherRegionButton {
  align-items: center;
  background: #2bac4d;
  border: 2px solid #269844;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 700;
  height: 46px;
  justify-content: center;
  line-height: 1.6;
  transition: background-color 0.3s cubic-bezier(0.39, 0.575, 0.565, 1);
  width: 100%;
}

.otherRegionButton:hover {
  background: #269844;
}

.otherRegionButton.active {
  background: #0f802d;
}
.mapImage__svgContainer:has(.otherRegionsContainer) {
  padding: 20px 30px 40px;
}

@media screen and (max-width: 767px) {
  .searchTopInner {
    border-radius: 0;
    margin: 0 -20px;
  }
  .searchForm__headerImg {
    display: none;
  }
  .searchForm__header {
    display: block;
    margin-bottom: 40px;
    padding: 0 40px;
  }
  .mapImage__svgContainer {
    padding: 40px 10px;
  }
  .mapImage__svgContainer:has(.otherRegionsContainer) {
    padding: 10px 10px 40px;
  }
  .searchFormDisplay {
    padding: 20px;
  }
  .allAreas {
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    width: calc(100% - 20px);
  }
  .mapSelected__area {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    justify-content: flex-start;
    left: 10px;
    text-align: start;
    top: 10px;
  }
  .mapSelected__area p:first-child {
    width: 100%;
  }
  .mapSelected__area p:not(:first-child) {
    position: relative;
  }
  .mapSelected__area:not(.otherRegions) p:not(:first-child):not(:last-child)::after {
    background: #333;
    content: "";
    height: 13px;
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%) rotate(35deg);
    width: 2px;
  }
  .mapImage__svgContainer:has(svg.hasNoPad),
  .mapImage__svgContainer:has(svg.hasNoPadSP),
  .mapImage__svgContainer:has(svg.tokyoArea) {
    padding: 0 10px;
  }
  .mapImage {
    margin-top: 20px;
    padding: 40px 0 20px;
  }
  .stationSingle__fieldset {
    grid-template-columns: repeat(4, 1fr);
  }
  .searchBottom {
    padding-bottom: 22.2vw;
  }
  .mapImage:has(.allAreas.active:not(.hidden)) .mapImage__svgContainer {
    margin-top: 80px;
  }
  .mapImage:has(.allAreas:not(.hidden)) .mapSelected__area {
    align-items: center;
    justify-content: center;
    left: 50%;
    text-align: center;
    top: 64px;
    transform: translateX(-50%);
    width: 100%;
  }
  .otherRegionsContainer {
    grid-template-columns: repeat(3, 1fr);
  }
  .mapImage .mapSelected__area.otherRegions {
    left: 20px;
    max-width: calc(100% - 40px);
  }
  .regionDisplaySpace {
    display: block;
  }
}

@media screen and (max-width: 500px) {
  .searchForm__selectArea {
    display: grid;
    gap: 16px 8px;
    grid-template-columns: 1fr 1fr 1fr;
  }
  .brandGroup .searchForm__selectArea {
    grid-template-columns: 1fr 1fr;
  }
  .mapSelected__area p .large {
    font-size: 16px;
  }
  .searchForm__navButton.active::after {
    display: none;
  }
  .searchForm__nav {
    gap: 0;
    top: -40px;
    width: calc(100% + 4px);
  }
  .searchFormDisplay {
    border-top: none;
  }
  .searchForm__navButton:first-child {
    border-right: 1px solid #333;
  }
  .searchForm__navButton.second {
    border-left: 1px solid #333;
  }
  .searchForm__header {
    padding: 0;
  }
  .searchForm__error {
    font-size: 14px;
  }
  .searchForm__count {
    font-size: 19px;
  }
  .warningModal.isLeft {
    left: 0;
  }
  .warningModal.isRight {
    right: 0;
  }
  .warningModal {
    max-width: calc(100% - 40px);
    top: 40px;
  }
  .stationSingle__fieldset {
    grid-template-columns: repeat(2, 1fr);
  }
  .searchBottom {
    padding-bottom: 35vw;
  }
  .searchFormDisplay {
    padding-top: 38px;
  }
  .mapImage {
    margin-top: 28px;
  }
  .otherRegionsContainer {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 350px) {
  .mapSelected__area p .large {
    font-size: 12px;
  }
  .searchForm__selectArea {
    gap: 18px 10px;
    grid-template-columns: 1fr 1fr;
  }
  .brandGroup .searchForm__selectArea {
    grid-template-columns: 1fr;
  }
  .otherRegionsContainer {
    grid-template-columns: 1fr;
  }
}
