/*
SMP EmbeddedForm Default CSS
*/

.smp_form {
  /* // SMP EmbeddedForm Default CSS
  // シャノンフォームにデフォルトで設定されていたcss、適宜書き換えて良いと思う。 */
}

  .smpForm {
    position: relative;
    margin-left: auto;
    margin-right: auto;

    &:has(.ss_complete_message) {
      height: 100% !important;
    }
  }
  .ss_contents input[type='number']::-webkit-outer-spin-button,
  .ss_contents input[type='number']::-webkit-inner-spin-button,
  .ss_contents input[type='date']::-webkit-outer-spin-button,
  .ss_contents input[type='date']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .ss_contents {
    width: 100%;
    display: flex;
    flex-direction: column;

    &:has(.ss_enquete_form) {
      .ss_enquete_form {
        border-bottom: unset;
      }
    }

    &:not(:has(.ss_enquete_form)) {
      .ss_visitor_form {
        border-bottom: unset;
      }
    }
  }
  .ss_privacy_field {
    background-color: #f9f9f9;
  }
  .ss_privacy_field .ss_grid {
    background-color: #ffffff;
    overflow: auto;
    word-break: break-all;
  }
  .ss_contents fieldset {
    display: flex;

    &:last-child {
      border-bottom: unset;
    }

    @media screen and (max-width: 767px) {
      flex-direction: column;
    }
  }
  .ss_grid {
    padding: 20px;
    padding-right: 0;
    border-top: 1px solid #e2e2e2;
    display: flex;
    align-items: center;

    @media screen and (max-width: 767px) {
      padding: 0 0 1em;
      border-top: none;
    }
  }
  .ss_input {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 8px;

    &:has(input[type=checkbox]) {
      display: block;
    }

    &:has(input[type=radio]) {
      table {
        margin: 0;
        tr {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 16px;
          align-items: start;

          td {
            padding: 0;
            display: inline-flex;
            border: unset;
          }
        }
      }
    }
  }
  .ss_input br {
    display: none;
  }
  .ss_form_title ,.ss_enquete_title {
    width: 35%;
    font-size: 16px;
    padding: 30px 0 25px;
    color: #222;
    border-top: 1px solid #002d78;
    line-height: 1.8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    line-height: 1;

    @media screen and (max-width: 767px) {
      width: 100%;
      padding-bottom: 10px;
      border-color: #e2e2e2;
      font-weight: bold;
      position: relative;

      &::before {
        content: "";
        width: 3em;
        height: 1px;
        display: block;
        background: #002d78;
        position: absolute;
        top: -1px;
        left: 0;
      }
    }
  }
  .ss_user_notnull {
    color: red;
    display: none;
  }
  .ss_field + .ss_field,
  .ss_enquete_form fieldset {
    border-top: none;
  }
  .ss_contents input,
  .ss_contents select {
    padding: 10px;
    border: unset;
    background: #f5f5f5;
    color: #222;
    font-size: 1.6rem;
  }
  .ss_contents input,
  .ss_contents select ,.ss_contents textarea {
    padding: 10px 15px 10px 20px;
    max-width: 565px;
    width: 100%;
    height: auto;
    border: 1px solid #e0e2e1;
    background: #f7f7f5;
    color: #222;
    font-size: 15px;
    border-radius: 5px;

    @media screen and (max-width: 767px) {
      max-width: unset;
    }
  }
  .ss_contents textarea {
    min-height: 225px;
  }
  .ss_contents input[type=checkbox] {
    width: fit-content;
    min-width: unset;
    margin-right: 8px;
    margin-bottom: 4px;
    display: inline-block;
  }
  .ss_contents input[type=radio] {
    width: fit-content;
    min-width: unset;
    margin-right: 8px;
    margin-bottom: 4px;
    display: inline-block;
  }
  .ss_contents a {
    color: #0a9ece;
    /* padding: 0 0 0 1.5em; */
    position: relative;
    display: inline-block;

    /* &::before {
      font-family: 'tandc';
      content: "\e902";
      position: absolute;
      top: 0;
      left: 0.3em;
    } */
  }
  .ss_grid:has(.ss_warning_label) {
    position: relative;

    .ss_warning_label {
      display: none;
      position: absolute;
      left: 0;
      top: 4px;
    }

    .ss_error_msg ,.errorMsg {
      width: 100%;
      display: block;
      order: 998;
    }

    .ss_rightComment , .ss_bottomComment {
      order: 999;
    }
  }
  input[type=checkbox]:focus {
    border-color: unset;
  }
  .ss_required_field .ss_form_title::after ,.ss_required_field .ss_enquete_title::after {
    content: "必須";
    display: inline-flex;
    align-items: center;
    padding: 5px 15px;
    background: #d53945;
    color: #fff;
    font-size: 0.7em;
    border-radius: 10px;
    word-break: keep-all;
  }
  .ss_upComment,
  .ss_leftComment,
  .ss_rightComment, .ss_bottomComment {
    color: #c0c0c0;
    font-size: 14px;

    &:has(.ph) {
      color: #626262;
      font-size: 15px;
    }
  }
  .ss_btnArea {
    width: 100%;
    text-align: center;
    margin: 0 auto;
    padding-top: 80px;
    border-top: 1px solid #d6d6d6;
    order: 999;

    &::before {
      content: "※「送信」ボタンをクリックすると、確認画面を通らずにそのまま送信されます。\A入力内容にお間違いがないか、今一度ご確認をお願いいたします。";
      white-space: pre-wrap;
      display: block;
      line-height: 1.5;
      margin-bottom: 40px;

      @media screen and (max-width: 767px) {
        text-align: left;
        white-space: inherit;
      }
    }

    p {
      width: fit-content;
      margin: 0 auto !important;
      text-align: center;
      overflow: hidden;
      border-radius: 2em;
      position: relative;
      transition: all 0.3s ease-out;

      &::before {
        font-family: 'tandc';
        content: "\e902";
        display: inline-block;
        padding: 0 0.3em 0 0;
        position: absolute;
        top: 50%;
        left: 90px;
        -webkit-transform: translate(0, -50%);
        transform: translate(0, -50%);
        z-index: 3;
        color: #002d78;
        transition: all 0.3s ease-out;
      }

      &::after {
        content: "";
        width: 0;
        height: 100%;
        background: #002d78;
        background-image: -moz-linear-gradient( -30deg, #002d78 1%, #85c5ee 100%);
        background-image: -webkit-linear-gradient( -30deg, #002d78 1%, #85c5ee 100%);
        background-image: -ms-linear-gradient( -30deg, #002d78 1%, #85c5ee 100%);
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        transition: all 0.2s ease-out;
      }

      &:hover {
        /* opacity: .5; */
        input {
          color: #fff;
          border-color: transparent;
        }

        &::before {
          color: #fff;
        }

        &::after {
          width: 100%;
        }
      }
    }

    @media screen and (max-width: 767px) {
      padding-top: 40px;
    }
  }
  .ss_btnArea input {
    min-width: 240px;
    padding: 0.9em 1em;
    padding-left: calc(1em + 20px);
    position: relative;
    display: inline-block;
    overflow: hidden;
    color: #002d78;
    font-size: 0.938em;
    text-align: center;
    vertical-align: bottom;
    background: unset;
    border: 1px solid #002d78;
    border-radius: 2em;
    transition: all 0.3s ease;
    z-index: 2;
    line-height: 1;
  }
  .ss_warning_label {
    background-color: #fc92a5;
    border-radius: 3px;
    vertical-align: top;
    display: inline-block;
    padding: 2px;
    font-size: 11.844px;
    line-height: 12px;
    color: #ffffff;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    white-space: nowrap;
  }
  .ss_error_msg,
  .errorMsg {
    vertical-align: top;
    font-size: 0.85em;
    color: #d53945;
  }
  .ss_complete_message {
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  /* 注釈テキスト */
  .form_note_text {
    font-size: 14px;
    color: #999;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    line-height: 1.5;

    &::before {
      content: "※";
    }
  }

  /* 氏名 */
  #ss_name , #ss_name_ka {
    .ss_grid {
      position: relative;

      @media screen and (max-width: 767px) {
        display: flex;
        flex-direction: column;
        gap: 8px;
      }
    }
    .ss_input {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      align-content: flex-end;
      gap: 4px;
      flex-direction: row;

      input[type=text] {
        flex: 1;
      }
    }
    .ss_leftComment {
      font-size: 15px;
      color: #222;
    }

    .ss_upComment , .ss_rightComment {
      width: 100%;
    }

    .ss_input:first-of-type .ss_rightComment {
      display: block;

      @media screen and (max-width: 767px) {
        display: none;
      }
    }

    .ss_input:last-of-type .ss_rightComment {
      width: fit-content;
      position: absolute;
      bottom: 20px;
      left: 20px;

      @media screen and (max-width: 767px) {
        visibility: visible;
        left: 0px;
      }
    }

    .ss_grid:has(.ss_warning_label) {
      .ss_input {
        .ss_error_msg, .errorMsg {
          margin-bottom: 0;
        }
      }
    }
  }

  /* 個人情報の取り扱い */
  [id="ss_VisitorData.attribute1"] {
    .ss_input {
      .ss_upComment {
        margin-bottom: 16px;
      }

      &:has(.ss_error_msg,
      .errorMsg) {
        position: relative;
        padding-bottom: 20px;

        .ss_error_msg,
        .errorMsg {
          position: absolute;
          bottom: 0;
          left: 0;
        }
      }
    }
  }

  /* Spinner */
  .ss_submit_loader {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.25);
  }
  .spinner::before {
    content: '';
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    height: 100px;
    width: 100px;
    margin-top: -50px;
    margin-left: -50px;
    border-radius: 50%;
    border: 0.5em solid #ffffff;
    border-top-color: rgba(0, 0, 0, 0);
    -webkit-animation: spinner 1s infinite infinite;
    animation: spinner 1s linear infinite;
  }
  @-webkit-keyframes spinner {
    100% {
      -webkit-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }
  @keyframes spinner {
    100% {
      -webkit-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }

  /*
    Responsive CSS
  */
  /* PC */
  @media screen and (min-width: 768px) {
    #ss_name .ss_grid ,  #ss_name_ka .ss_grid {
      display: grid;
      grid-template-columns: repeat(2 , 1fr);
      gap: 16px;
      align-items: start;
    }
    .ss_grid {
      width: 100%;
      flex: 1;
      /* // display: -webkit-box;
      // display: -ms-flexbox;
      // display: flex; */
    }
  }
  /* ipad */
  @media screen and (max-width: 767px) {
    .ss_rightComment {
      display: block;
    }
    .ss_grid {
      width: 100%;
      word-break: break-all;
    }
    .ss_grid input:not([type='checkbox']):not([type='radio']):not([type='date']):not([type='datetime-local']) {
      width: 100%;
    }
  }
  /* Vertical Screen (Smartphone) */
  @media screen and (max-width: 480px) {
    .ss_leftComment {
      display: block;
    }
    .ss_grid input:not([type='checkbox']):not([type='radio']) {
      width: 100%;
    }
  }

  /* 完了画面 */
  .contact_attention {
    font-size: 1em;
    font-weight: 300;
}