@charset "utf-8";

:root {
  --accent-color: #008fdb;
}

.allergy-backbtnContainer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: calc(1000px + 30px * 2);
  padding: 10px 4%;
  display: flex;
  align-items: center;
}
.allergy-backbtn {
  position: relative;
  padding-left: 1em;
  line-height: 2;
  font-size: 1.4rem;
  font-weight: 600;
}
.allergy-backbtn::before,
.allergy-backbtn::after {
  content: "";
  position: absolute;
  top: 50%;
  display: block;
  width: 0;
  height: 0;
  border-right: 0.4em solid;
  border-top: 0.5em solid transparent;
  border-bottom: 0.5em solid transparent;
  transform: translate(0, -50%);
  transition: left 0.2s;
}
.allergy-backbtn::before {
  left: 0;
  border-right-color: #333;
}
.allergy-backbtn::after {
  left: 2px;
  border-right-color: #fff;
}
@media (hover: hover) {
  .allergy-backbtn:hover {
    opacity: 0.8;
  }
  .allergy-backbtn:hover::before {
    left: -5px;
  }
  .allergy-backbtn:hover::after {
    left: -3px;
  }
}
@media screen and (min-width: 768px) {
  .allergy-backbtnContainer {
    left: 50%;
    right: auto;
    translate: -50% 0;
    padding-inline: 30px;
  }
  .allergy-backbtn {
    font-size: 1.6rem;
  }
}

/* ----- common ----- */
.sec {
  position: relative;
  min-height: calc(100vh - 60px);
  padding: 70px 4% 100px;
  background-color: #f7f9fa;
}
.sec-ttl {
  text-align: center;
  font-size: 3rem;
  font-weight: 800;
}

@media screen and (min-width: 768px) {
  .sec {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: 60px 30px 120px;
  }
  .sec-inner {
    margin: auto;
    max-width: 1000px;
  }
  .sec-ttl {
    font-size: 4rem;
  }
}

/* ----- allergyNotes ----- */
.allergyNotes {
  margin-top: 30px;
  padding: 10px;
  border: 1px solid #8b4513;
  border-radius: 15px;
}
.allergyNotes-txt {
  line-height: 1.5;
  font-size: 1.4rem;
}
.allergyNotes-supplement {
  margin-top: 10px;
}
.allergyNotes-supplement li {
  padding-inline-start: 1em;
  text-indent: -1em;
  line-height: 1.5;
  font-size: 1.2rem;
}
.allergyNotes-supplement li + li {
  margin-top: 5px;
}
.allergyNotes-supplement li::before {
  content: "※";
  color: #ff0000;
}

/* ----- allergyTab ----- */
.allergyTab {
  position: relative;
  margin-top: 25px;
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: calc(1px / 0);
  box-shadow: 5px 5px 5px 0 rgba(0 0 0 / 6%);
  overflow: hidden;
}
.allergyTab::before {
  content: "";
  position: absolute;
  top: 0;
  left: -6%;
  display: block;
  width: 65%;
  height: 100%;
  background-color: #008fdb;
  border-radius: calc(1px / 0);
  transition: left 0.3s;
}
.allergyTab > li {
  position: relative;
  z-index: 1;
  flex-grow: 1;
  padding: 1.1em 1.4em;
  text-align: center;
  font-size: 1.4rem;
  cursor: pointer;
}
.allergyTab > li:nth-child(1) {
  width: 58%;
  padding-left: 1.8em;
  font-weight: 600;
  color: #fff;
}
.allergyTab > li:nth-child(2) {
  width: 42%;
  padding-right: 1.8em;
}

.allergyTab.is-right::before {
  left: 55%;
}
.allergyTab.is-right > li:nth-child(1) {
  font-weight: 400;
  color: #333;
}
.allergyTab.is-right > li:nth-child(2) {
  font-weight: 700;
  color: #fff;
}

.allergyTabContent > div {
  margin-top: 40px;
  display: none;
}

@media screen and (min-width: 768px) {
  .allergyTab > li {
    font-size: 1.8rem;
  }
}

/* ----- allergyForm ----- */
.allergyForm {
  margin-bottom: 40px;
  width: 100%;
}
.allergySelect {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border: none;
  appearance: none;
  outline-color: var(--accent-color);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
}
form:has(.allergySelect) {
  position: relative;
}
form:has(.allergySelect)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 20px;
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  transform: translate(0, -70%) rotate(45deg);
}

.allergyTable-wrapper {
  overflow-x: scroll;
  scrollbar-width: none;
}
.allergyTable {
  display: none;
}
.allergyTable.is-show {
  display: block;
}
.allergyTable thead {
  background-color: #e1f1fa;
}
.allergyTable thead tr th,
.allergyTable thead tr td {
  padding: 20px 10px;
  white-space: nowrap;
  font-size: 1.4rem;
  font-weight: 700;
}
.allergyTable thead tr td {
  width: 5%;
  min-width: 60px;
  border-left: 1px solid #fff;
  text-align: center;
}
.allergyTable thead tr th,
.allergyTable tbody tr th {
  display: block;
  width: 100%;
  min-width: 150px;
  text-align: left;
}
.allergyTable tbody tr {
  border-bottom: 1px solid #eee;
}
.allergyTable tbody tr:last-of-type {
  border-bottom: none;
}
.allergyTable tbody th,
.allergyTable tbody td {
  padding: 15px 10px;
  vertical-align: middle;
  line-height: 1.25;
  font-size: 1.4rem;
}
.allergyTable tbody tr td {
  background-color: #fff;
  border-left: 1px solid #eee;
  text-align: center;
  font-weight: 900;
}
.allergyTable tbody tr td .maru {
  margin: auto;
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #333;
}

.allergyTable *:has(> ._sticky) {
  position: relative;
}
._sticky {
  position: sticky;
  top: 0;
  left: 0;
}
._sticky::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  background-color: #fff;
  border-right: 1px solid #eee;
}
thead ._sticky::before {
  background-color: #e1f1fa;
  border-right: 1px solid #fff;
}

@media screen and (min-width: 768px) {
  .allergyForm {
    margin: 50px auto;
    width: 600px;
  }
  .allergySelect {
    font-size: 1.8rem;
    font-weight: 500;
  }

  .allergyTable-wrapper {
    overflow-x: visible;
  }
  .allergyTable thead tr th,
  .allergyTable thead tr td {
    padding: 20px 15px;
    font-size: 1.6rem;
  }
  .allergyTable tbody th,
  .allergyTable tbody td {
    padding: 15px;
    font-size: 1.6rem;
  }
}

/* ----- allergySearch ----- */
.allergySearch-txt {
  padding-inline: 10px;
  line-height: 1.5;
  font-size: 1.4rem;
  font-weight: 600;
}
.allergySearch-txt ._fs {
  font-size: 0.9em;
}

.allergySearch-notes {
  padding-inline: 10px;
}
.allergySearch-notes li {
  padding-left: 1em;
  text-indent: -1em;
  line-height: 1.5;
  font-size: 1.2rem;
}
.allergySearch-notes li::before {
  content: "※";
}

.allergySearch-checkList {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 14px 15px;
}

.allergySearchCheckBtn {
  width: 75px;
  height: 75px;
  padding: 2px;
  box-shadow: 5px 5px 5px 0 rgba(0 0 0 / 6%);
  background-color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
}
.allergySearchCheckBtn.is-checked {
  border-color: #008fdb;
}
.allergySearchCheckBtn label {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.allergySearchCheckBtn.is-checked label {
  background-color: #008fdb;
}
.allergySearchCheckBtn-icon {
  position: relative;
  width: 34px;
}
.allergySearchCheckBtn-icon img {
  aspect-ratio: 1 / 1;
}
.allergySearchCheckBtn img:nth-child(1) {
  opacity: 1;
}
.allergySearchCheckBtn.is-checked img:nth-child(1) {
  opacity: 0;
}
.allergySearchCheckBtn-icon img:nth-child(2) {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.allergySearchCheckBtn.is-checked img:nth-child(2) {
  opacity: 1;
}
.allergySearchCheckBtn-name {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
}
.allergySearchCheckBtn-name._fsS {
  font-size: 1.1rem;
}
.allergySearchCheckBtn.is-checked .allergySearchCheckBtn-name {
  color: #fff;
}
.allergySearchCheckBtn label input {
  display: none;
}

.allergySearchBtn {
  margin: 50px auto 0;
  width: 180px;
  height: 50px;
  border-radius: calc(1px / 0);
  background-color: #008fdb;
  box-shadow: 5px 5px 5px 0 rgba(0 0 0 / 6%);
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 0.7em;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  opacity: 1;
  transition: filter 0.2s;
}
@media (hover: hover) {
  .allergySearchBtn:hover {
    opacity: 0.9;
  }
}
.allergySearchBtn.is-disabled {
  filter: brightness(0.5);
  pointer-events: none;
}
.allergySearchBtn-icon {
  position: relative;
  rotate: -45deg;
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50%;
}
.allergySearchBtn-icon::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 0);
  display: block;
  width: 2px;
  height: 60%;
  background-color: #fff;
}

@media screen and (min-width: 768px) {
  .allergySearch-txt {
    padding-inline: 20px;
    font-size: 1.8rem;
  }

  .allergySearch-notes {
    padding-inline: 20px;
  }
  .allergySearch-notes li {
    font-size: 1.4rem;
  }

  .allergySearch-checkList {
    justify-content: center;
  }

  .allergySearchBtn {
    width: 220px;
    height: 60px;
    font-size: 1.8rem;
  }
  .allergySearchBtn-icon {
    width: 18px;
    height: 18px;
    border-width: 3px;
  }
  .allergySearchBtn-icon::after {
    width: 3px;
    height: 75%;
  }
}

/* ====================
  allergySearchResult page 
  ==================== */
#allergySearchResult .allergySearch-txt {
  margin-top: 50px;
  padding: 0;
}

#allergySearchResult .allergySearch-headline {
  margin-top: 40px;
  margin-bottom: 15px;
  padding-left: 0.3em;
  border-left: 3px solid #008fdb;
  line-height: 1.3;
  font-size: 1.6rem;
  font-weight: 700;
}
@media screen and (min-width: 768px) {
  #allergySearchResult .allergySearch-headline {
    font-size: 2rem;
  }
}

.pagetop {
  position: fixed;
  z-index: 102;
  bottom: 65px;
  left: 5px;
  width: 40px;
  height: 40px;
  background-color: #333;
}
.pagetop::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -40%;
  rotate: 45deg;
  width: 20%;
  height: 20%;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
}
@media screen and (min-width: 768px) {
  .pagetop {
    left: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
  }
}
