.error-message {
  color: #DC3232;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}

button {
  cursor: pointer;
}

svg {
  fill:none;
}

.Button.search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  width: calc(100% / 3);
}

.Button.search .Button__icon {
  margin-left: auto;
}

.-title-mt {
  margin-top: 120px;
}

.search-button {
  margin: 56px auto 0 auto;
  background-color: #333333;
  color: #FFFFFF;
  padding: 13.5px 14px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: background-color 0.3s ease;
  width: 323px;
  display: flex;
}

.reset-button {
  margin-top: 24px;
  margin-bottom: 56px;
  display: block;
  text-align: center;
  background-color: #666666;
  color: #FFFFFF;
  padding: 5px 16px;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: background-color 0.3s ease;
  width: fit-content;
}

.AllergieGrid {
  display: grid;
  grid-template-columns: repeat(10, 0fr);
  gap: 4px;
  margin-top: 32px;
}

.-allergie-text-wrapper {
  border: solid 1px #CCCCCC;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  height: 52px;
  width: 103.2px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.-allergie .-alm {
  margin-top: 24px;
  margin-bottom: 16px;
}
.-center {
  text-align: center;
}

.-allergie-pic-wrapper {
  margin-right: 4px;
  cursor: pointer;
}

.-allergie-pic-container {
  border: solid 1px #CCCCCC;
  height: 4.5rem;
  width: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.1875rem;
  transition: all 0.3s ease;
}

.search-font {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  font-family: "Noto Sans JP";
}
.-mr24 {
  margin-right: 24px;
}

.-allergie .-mt8 {
  margin-top: 8px;
}

.Radio__label {
  cursor: pointer;
}

.-allergie .Radio__label:before {
  top: 50%;
  left: 9px;
  width: 18px;
  height: 18px;
  transform: translateY(-47%);
}

.-allergie .Radio__label:after {
  top: 50%;
  left: 12px;
  width: 12px;
  height: 12px;
  transform: translateY(-47%);
}

.radio-font {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.-allergie_header {
  margin-bottom: 40px;
}

.-allergie p  {
  margin: 0;
}

.main-font {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}
.allergie-choice-container {
  background-color: #F8F8F8;
  padding: 16px;
}
.-mt8 {
  margin-top: 8px;
}

.grid_menu {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-top: 0;
}

.allergie-container {
  height: 252px;
  overflow-y: auto;
  border: 1px solid #CCCCCC;
  padding: 24px;
}

  .AllergieFlex {
  display: flex;
}

.AllergieGrid__image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.Radio__input:checked + .Radio__label:after {
  transform: none;
  transform: translateY(-47%);
}

/* アレルゲンの色反転 */
.-allergie-text-wrapper input[type="checkbox"]:checked,
.-allergie-text-wrapper:hover {
    background-color: #333333;
}

.-allergie-text-wrapper input[type="checkbox"]:checked + p,
.-allergie-text-wrapper:hover p {
    color: #FFFFFF;
}

.-allergie-text-wrapper.selected, 
.-allergie-pic-container.selected,
.-allergie-pic-container:hover {
  background-color: #333333;
}

.-allergie-text-wrapper.selected p, 
.-allergie-pic-container.selected svg path,
.-allergie-pic-container.selected svg circle,
.-allergie-pic-container:hover svg path,
.-allergie-pic-container:hover svg circle {
  color: #FFFFFF;
  fill: #FFFFFF;
}

.-allergie-pic-container.selected svg path[stroke="#333333"],
.-allergie-pic-container:hover svg path[stroke="#333333"] {
  stroke: #FFFFFF;
}

.-allergie-pic-container.selected svg path[stroke="#FFFFFF"],
.-allergie-pic-container:hover svg path[stroke="#FFFFFF"] {
  stroke: #333333;
}

.-allergie-pic-container.selected svg path[fill="#333333"],
.-allergie-pic-container:hover svg path[fill="#333333"] {
  fill: #FFFFFF;
}

.-allergie-pic-container.selected svg path[fill="#FFFFFF"],
.-allergie-pic-container:hover svg path[fill="#FFFFFF"] {
  fill: #333333;
}

input[type="checkbox"] {
    display: none;
}

#allergy-search {
  scroll-margin-top: 80px;
}

@media (max-width: 1120px) {
  .AllergieGrid {
    grid-template-columns: repeat(8, 0fr);
  }

  .Button.search {
    width: 100%;
  }
}

@media (max-width: 977px) {
  .AllergieGrid {
    grid-template-columns: repeat(7, 0fr);
  }
}

@media (max-width: 768px) {
  .radio-font {
    font-weight: 500;
  }

  .-allergie-pic-wrapper {
    margin-right: 0;
    margin-bottom: 16px;
  }

  .error-message {
    font-size: 16px;
  }

  .search-button {
    width: 100%;
  }

  .RadioList {
    margin-left: -8px;
  }
  
  .AllergieGrid__item {
    padding: 0.75rem;
  }
  
  .AllergieGrid__image {
    width: 50px;
    height: 50px;
  }
  
  .AllergieGrid__label {
    font-size: 0.8rem;
  }

  .allergie-container {
    height: 358px;
    padding: 16px;
  }
  .grid_menu {
      display: block;
    }

  .Button {
    margin-top: 8px;
  }
  .-title-mt {
    margin-top: 80px;
  }

  .AllergieFlex {
    display: grid;
    grid-template-columns: repeat(4, 0fr);
    gap: 4px;
    justify-content: center;
  }

  .AllergieGrid {
    display: grid;
    grid-template-columns: repeat(3, 0fr);
    gap: 4px;
    margin-top: 8px;
  }

  .-allergie-pic-container {
    height: calc((100vw - 2rem - 12px) / 4);
    width: calc((100vw - 2rem - 12px) / 4);
  }

  .-allergie-text-wrapper {
  border: solid 1px #CCCCCC;
  display: flex;
  width: calc((100vw - 2rem - 12px) / 3);
}

  .icon {
  height: auto;
  width: calc(40 / 390 * 100vw);
}
}

