@charset "UTF-8";

.join-page {
  .contents {
  }
  .join-notice {
    padding: 24px;
    background-color: var(--gray-pale);
    border-radius: 12px;
  }
  .sect {
    &.over {
      .head.copy {
        padding: 8px 0 18px;
      }
    }
  }

  .section {
    display: grid;
    gap: 60px;
  }

  .join-section {
    .head {
      padding-bottom: 0;
      h1 {
        font-size: 1.25em;
        margin-bottom: 8px;
      }

      h3 {
        margin: 0;
        font-size: 1.05em;
        font-weight: 700;
      }
    }
  }

  .join-guide,
  .join-notice {
    .head p {
      color: var(--gray-mid);
    }
  }

  .join-guide {
    .head p span {
      color: var(--main-color);
      font-weight: 700;
    }
  }

  .join-agreement {
    .row,
    .row .section {
      display: grid;
      gap: 14px;
    }

    .agreement-set {
      display: grid;
      gap: 16px;
      /* border: 1px solid var(--gray-border); */
      border-radius: 12px;
      padding: 24px;
      background: var(--gray-pale);
    }

    .agreement-box.small {
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 16px;
      > p {
        margin-top: 8px;
        margin-bottom: 8px;
        color: var(--gray-mid);
        line-height: 1.5;

        &:first-child {
          margin-top: 0;
        }
      }

      .terms-scroll {
        max-height: 320px;
        overflow: auto;
        border: 1px solid var(--gray-border);
        border-radius: 8px;
        padding: 18px;
        background: var(--white);
      }
    }

    .agreement-consent {
      display: grid;
      gap: 8px;

      justify-content: center;
      text-align: center;
      > p {
        margin: 0;
        color: var(--gray-dark);
        font-weight: bold;
        line-height: 1.5;
      }
    }

    .inputs.choice {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      align-items: center;
      justify-content: center;
      --input-rect: 30px;
      label {
        color: var(--gray-dark);
        font-weight: bold;
      }

      &.nowrap {
        flex-wrap: nowrap;
      }

      &.full {
        display: grid;
        gap: 6px;
      }
    }

    > .row > .section > p:first-of-type:empty {
      display: none;
    }
  }
  .select-sale {
    display: grid;
    gap: 6px;
    text-align: left;
    justify-content: flex-start;
  }

  .select-sale-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;

    input {
      margin-top: 3px;
      flex: 0 0 auto;
    }

    label {
      color: var(--gray-dark);
      line-height: 1.5;
    }
  }
  .join-form {
    > p {
      margin-bottom: 10px;
      color: var(--gray-mid);
    }

    .inputs label {
      color: var(--gray-dark);
    }
  }

  #regForm {
    border-radius: 12px;
    background: var(--gray-pale);
    border: 0;
    .inputs.full {
      display: grid;
      gap: 6px;
    }
    table {
      background-color: var(--gray-pale);
      th {
        background-color: var(--gray-pale);
      }
    }
    .form-in > p,
    td > p {
      margin-top: 8px;
      font-size: 0.92em;
      color: var(--red);
    }

    #zipCode,
    #roadAddress {
      background: var(--gray-pale);
    }

    .confirm {
      margin-top: 8px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      * {
        width: auto;
      }
      .red-color {
        font-weight: 700;
        color: var(--red);
      }

      a {
        text-decoration: underline;
        color: var(--gray-dark);
      }
    }
  }

  .user_cert_btn,
  .address_btn,
  .with-input {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--input-h);
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--gray-border);
    background: #fff;
    color: var(--gray-dark);
    font-weight: 700;
    flex-grow: 0;
  }
  .form-in {
    text-align: left;
    margin-top: 8px;
  }
  .global_btn {
    margin-top: 18px;

    a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      padding: 1em;
      font-size: 1.1em;
      border-radius: 10px;
      color: #fff;
      font-weight: 700;
      background: linear-gradient(120deg, var(--main-light), var(--main-color));
    }
  }

  .join-submit-outside {
    margin: 0 auto;
    margin-top: 20px;
    .global_btn {
      margin-top: 0;
    }
  }
  table,
  .allborder {
    border: 1px solid var(--gray-border);
    background-color: #fff;
    thead {
      th {
        text-align: center;
      }
    }
    th {
      font-weight: bold;
      white-space: nowrap;
      background-color: #fff;
      text-align: left;
    }
    th,
    td {
      border: 1px solid var(--gray-border);
      padding: 15px;
      text-align: left;
      &.form-in {
        padding: 5px;
      }
    }
  }
  @media (max-width: 812px) {
    .contents {
      padding-top: 68px;
      padding-bottom: 52px;
    }

    .sect {
      padding-left: 14px;
      padding-right: 14px;
    }

    .join-submit-outside {
      padding-left: 14px;
      padding-right: 14px;
      padding-bottom: 14px;
    }

    .join-section,
    #regForm {
      padding: 14px;
      border-radius: 10px;
    }

    #regForm {
      table,
      table tbody,
      table tr,
      table th,
      table td {
        display: block;
        width: 100%;
      }

      table {
        th {
          border-bottom: 0;
          padding: 12px 4px 4px;
        }

        td {
          border-bottom: 1px solid var(--gray-border);
          padding-top: 4px;
          padding-bottom: 12px;
        }
      }

      .confirm {
        display: grid;
        grid-template-columns: 1fr;
      }
    }

    .user_cert_btn,
    .address_btn,
    .with-input {
      width: 100%;
      margin-top: 6px;
    }
  }
}

/* readonly 상태는 회색 배경으로 수정 불가임을 시각화 */
body#join input[readonly],
body#join input:read-only {
  background-color: #e9ecef !important;
  color: #6c757d !important;
  cursor: not-allowed;
}

/* Chrome autofill 이 readonly input 을 연한 하늘색으로 덮는 것 방지 — box-shadow inset 으로만 가능 */
body#join input[readonly]:-webkit-autofill,
body#join input[readonly]:-webkit-autofill:hover,
body#join input[readonly]:-webkit-autofill:focus,
body#join input[readonly]:-webkit-autofill:active,
body#join input:read-only:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #e9ecef inset !important;
  -webkit-text-fill-color: #6c757d !important;
  caret-color: #6c757d;
}

/* 인증 완료 시각 피드백 — 초록 배경 */
body#join .auth-banner.verified,
body#join .phone_check.verified {
  background-color: #e8f5e9;
  border-color: #66bb6a;
}

/* 행정정보 인증 모달은 body 에 append 되어 .join-page 스코프 밖에 있으므로 모달 내 .with-input 을 별도로 스타일링 */
.modal.certificate-common .with-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--input-h);
  padding: 0 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--gray-dark);
  font-weight: 700;
  flex-grow: 0;
}

@media (max-width: 812px) {
  .modal.certificate-common .with-input {
    width: 100%;
    margin-top: 6px;
  }
}

/* 모달 내 SMS 인증확인 영역(.confirm) — 폼의 .confirm 과 동일한 flex 레이아웃 + 타이머 빨간 글자 + 링크 밑줄 */
.modal.certificate-common .confirm {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.modal.certificate-common .confirm * {
  width: auto;
}
.modal.certificate-common .confirm .red-color {
  font-weight: 700;
  color: var(--red);
}
.modal.certificate-common .confirm a {
  text-decoration: underline;
  color: var(--gray-dark);
}

@media (max-width: 812px) {
  /* 모바일: input 과 인증확인 버튼만 각자 한 줄을 차지하고, 타이머·시간연장·다시입력하기는 한 줄에 나란히 배치 */
  .modal.certificate-common .confirm > input {
    flex-basis: 100%;
  }
  .modal.certificate-common .confirm > .with-input {
    flex-basis: 100%;
  }
}

