/* 202506: フォームカスタマイズ */

.custom-select {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

button.trigger {
  position: relative;
  width: 100%;
  padding: 8px;
  border-radius: 2px;
  padding-right: 1em;
  border: 1px solid #DDDDDD;
  cursor: pointer;

  text-align: left;
  font-size: 1.6rem;
  line-height: 1.6;

  @media only screen and (min-width: 576px) {
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 16px;
    padding-right: 40px;
  }
  @media only screen and (max-width: 575.98px) {
    padding-top: 10.66667px;
    padding-bottom: 10.66667px;
    padding-left: 14.22222px;
    padding-right: 30px;
  }

  &::before {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto 0;
    content: '';
    pointer-events: none;
  }
  @media only screen and (max-width: 575.98px) {
    &::before {
      right: 17.77778px;
    }
  }
  @media only screen and (min-width: 576px) {
    &::before {
      right: 20px;
      width: 0;
      height: 0;
      padding: 0;
      border-left: 8px solid transparent;
      border-right: 8px solid transparent;
      border-top: 12px solid #000000;
    }
  }
  @media (max-width: 991.98px) {
    &::before {
      right: 17.77778px;
      width: 0;
      height: 0;
      padding: 0;
      border-left: 5.33333px solid transparent;
      border-right: 5.33333px solid transparent;
      border-top: 8.88889px solid #000000;
    }
  }
}

.options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  z-index: 1000;
  padding: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  
  .wpcf7-list-item {
    display: block;
    font-size: 1.6rem;
    margin-left: 0;
    &:not(:last-child) {
      margin-bottom: 8px;
    }
  }
}

.hidden {
  display: none;
}

/* 組み合わせの制御によりdisabledになった項目のlabel */
[class*="trial-service-checkbox-"] {
  label:has(input:disabled) {
    color: #666;
    background-color: #ddd;
  }
}

.service-btn {
  background-color: #edf9f4;
  background-color: #FAF8EE;
  border-radius: 12px;
  padding: 8px 16px 12px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  .form-item-caption {
    text-align: center;
    font-size: 1.4rem;
    padding-bottom: 16px;
    line-height: 1.6;
    word-break: auto-phrase;
    @media only screen and (max-width: 575.98px) {
      text-align: left;
    }
  }
  button.btn-add-service {
    width: 100%;
    max-width: 400px;
    height: 100%;
    padding: 8px;
    margin: 0 auto;
    border-radius: 8px;
    border: 2px solid #333;
    background-color: #fff;
    cursor: pointer;
    text-align: center;
    font-size: 1.6rem;
    line-height: 1.6;
    font-weight: bold;
    transition: opacity 0.3s ease;
    opacity: 1;

    @media only screen and (max-width: 575.98px) {
      max-width: none;
    }

    &:hover {
      opacity: 0.5;
    }

    @media only screen and (min-width: 576px) {
      padding-top: 12px;
      padding-bottom: 12px;
      padding-left: 16px;
      padding-right: 16px;
    }
    @media only screen and (max-width: 575.98px) {
      padding-top: 10.66667px;
      padding-bottom: 10.66667px;
      padding-left: 14.22222px;
      padding-right: 14.22222px;
    }
  }

  /* 削除ボタン */
  button.btn-delete-service {
    margin-top: 12px;
    padding: 0px 16px 8px;
    /* border: 2px solid #2AB080; */
    border-radius: 1000px;
    cursor: pointer;
    color: #2AB080;
    font-weight: bold;
    transition: opacity 0.3s ease;
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;

    &:hover {
      opacity: 0.5;
    }
    &.is-not-active {
      display: none;
    }
  }

  /* 追加ボタン：無効状態 */
  .btn-add-service.is-not-active {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
    &:hover {
      opacity: 0.2;
    }
  }

  .service-msg {
    margin-top: 8px;
    font-size: 0.9em;
    font-weight: bold;
    color: #F10A0A;
  }
}

/* Contact Form 7のレスポンス出力を非表示にする */
.wpcf7-response-output {
  padding: 0 !important;
  border: none !important;
  height: 0 !important;
  display: none !important;
  font-size: 0 !important;
}