/* ==========================================================================
   구독 / 카드등록 / 무료체험 — 레거시(frontend/php_website/html) 디자인 계승
   subscribe.php, subscribe-complete.php, free-trial.php, free-trial-complete.php 전용.
   home.php의 파란 디자인시스템(style.css)과는 별개로, 레거시 색상·레이아웃을 그대로 유지하되
   데스크톱(style.css)/모바일(m/style.css) 두 갈래를 하나의 반응형 CSS로 병합했다.
   브레이크포인트는 사이트 전역 기준(style.css)과 동일하게 960px / 720px 사용.
   ========================================================================== */

/* :root에 정의 — 로그인/카드등록/플랜전환 모달이 .sb-page의 형제 요소로 렌더링되므로
   .sb-page에만 스코프하면 모달 내부에서 변수가 상속되지 않아 무효화된다(border/background 소실). */
:root {
  --sb-blue: #224597;
  --sb-blue-soft: rgba(34, 69, 151, 0.08);
  --sb-green: #229755;
  --sb-red: #cf0d23;
  --sb-red-alt: #ff5454;
  --sb-red-soft: rgba(255, 84, 84, 0.08);
  --sb-border: #d5d5d5;
  --sb-border-light: #c8c8c8;
  --sb-input-border: #b1b1b1;
  --sb-input-bg: #eeeeee;
  --sb-text: #3d3d3d;
  --sb-text-soft: #666;
}

.sb-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  color: var(--sb-text);
}

.sb-page h1.sb-page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--sb-text);
  margin: 0 0 32px;
}

/* ---------------- 구독 신청 폼 (subscribe.php / free-trial.php) ---------------- */

.sbForm > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 56px;
  align-items: start;
  text-align: left;
}

.sbFormLeft > div:not(:first-child) {
  padding-top: 40px;
}

.sbFormLeft h4 {
  font-size: 26px;
  font-weight: 700;
  padding-bottom: 24px;
  margin: 0;
}

.sbFormLeft h5 {
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid var(--sb-border-light);
  padding-bottom: 12px;
  margin: 0 0 14px;
}

.confirmAgain h5 {
  font-weight: 700;
}

.sbFormLeft .sbRow {
  display: grid;
  grid-template-columns: 34% 66%;
  padding: 6px 0;
}

.sbFormLeft .sbRow > div > h6 {
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
  margin: 0;
}

.sbFormLeft .sbRow > div:first-child > h6 {
  font-weight: 700;
  color: var(--sb-text);
}

.confirmAgain > div:not(:first-child) {
  padding-top: 20px;
}

.confirmAgain h6 {
  font-size: 16px;
  font-weight: 700;
  padding-left: 12px;
  box-sizing: border-box;
  position: relative;
  margin: 0 0 4px;
}

.confirmAgain h6::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: var(--sb-text);
}

.confirmAgain ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.confirmAgain ul > li {
  font-size: 15px;
  line-height: 1.7;
  box-sizing: border-box;
  padding-left: 12px;
}

.confirmAgain p {
  font-size: 15px;
  color: var(--sb-red);
  padding-left: 12px;
  box-sizing: border-box;
  position: relative;
  margin: 0;
}

.confirmAgain p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: var(--sb-red);
}

/* 우측 플랜/체험 카드 영역 */
.sbFormRight {
  text-align: center;
}

.sbFormRight > div,
.planCard {
  border-radius: 10px;
  border: 1px solid var(--sb-border);
  box-sizing: border-box;
  padding: 28px 28px 32px;
  background: #fff;
  position: relative;
}

.sbFormRight h6 {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  margin: 1em 0;
  color: var(--sb-text-soft);
}

.sbFormRight h5 {
  font-size: 21px;
  font-weight: 800;
  margin: 10px 0;
  color: var(--sb-text);
}

.sbFormRight h4 {
  font-size: 30px;
  font-weight: 800;
  margin: 0;
}

.sbFormRight button,
.sbFormRight > div > button {
  width: 100%;
  height: 56px;
  border-radius: 10px;
  background: var(--sb-blue);
  border: 1px solid var(--sb-blue);
  font-size: 21px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sbFormRight button:hover,
.sbFormRight > div > button:hover {
  background: #1a3676;
}

.sbFormRight #startFreeTrialBtn {
  background: var(--sb-green);
  border-color: var(--sb-green);
}

.sbFormRight #startFreeTrialBtn:hover {
  background: #1c7c47;
}

.sbFormRight #startFreeTrialBtn:disabled {
  background: #9aa5b1;
  border-color: #9aa5b1;
  cursor: not-allowed;
  opacity: 0.85;
}

.planSelectSub {
  font-size: 13px;
  color: var(--sb-text-soft);
  text-align: center;
  margin: 10px 0 0;
}

.planCard:not(:last-of-type) {
  margin-bottom: 20px;
}

.subscribeUpsell {
  margin-top: 20px;
}

.upsellPlanRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--sb-border);
  font-size: 15px;
  color: var(--sb-text);
}

.upsellPlanRow:first-of-type {
  border-top: none;
  margin-top: 4px;
}

.upsellPlanRow span:last-child {
  font-weight: 700;
}

.planCard.planCardCurrent {
  border-color: var(--sb-blue);
  border-width: 2px;
}

.planCard.is-preselected:not(.planCardCurrent) {
  border-color: var(--sb-blue);
  box-shadow: 0 0 0 3px var(--sb-blue-soft);
}

.planCardBadge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--sb-green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.planCard.is-preselected:not(.planCardCurrent)::before {
  content: "선택하신 플랜";
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--sb-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

#reactivateNotice {
  margin-top: 20px;
}

/* ---------------- 공용 안내 문구 / 폼 요소 (모달 내부에서도 사용) ---------------- */

.alertText {
  font-size: 15px;
  line-height: 1.6;
  padding: 14px;
  border-radius: 8px;
  word-break: keep-all;
  text-align: center;
  margin: 0 0 16px;
}

.alertText.blue {
  color: var(--sb-blue);
  border: 1px solid var(--sb-blue);
  background: var(--sb-blue-soft);
}

.alertText.red {
  color: var(--sb-red-alt);
  border: 1px solid var(--sb-red-alt);
  background: var(--sb-red-soft);
}

.inputCover {
  margin-bottom: 16px;
}

.inputCover > label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.inputCover input {
  display: block;
  width: 100%;
  background: var(--sb-input-bg);
  border: 1px solid var(--sb-input-border);
  box-sizing: border-box;
  height: 44px;
  padding: 0 14px;
  font-size: 16px;
  color: #000;
  border-radius: 6px;
}

.inputCover input::placeholder {
  color: var(--sb-input-border);
}

.inputCover .passwordToggle {
  position: relative;
}

.inputCover .passwordToggle > input {
  padding-right: 44px;
}

.inputCover .passwordToggle > button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 0;
}

.inputCover .passwordToggle > button img {
  width: 18px;
  height: 18px;
}

.btnArea {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btnArea > button {
  width: 100%;
  height: 50px;
  border-radius: 8px;
  border: 1px solid #636363;
  background: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.btnArea > button:first-child {
  color: #fff;
  background: var(--sb-blue);
  border: 1px solid var(--sb-blue);
}

/* ---------------- 모달 (footer.php의 .modal-overlay/.modal-box 프레임 재사용) ---------------- */

.sb-modal.modal-box {
  max-width: 440px;
  width: 92%;
}

.sb-modal .modal-body {
  padding: 24px 26px 28px;
}

.sb-modal .modal-body > p:first-child {
  margin-top: 0;
}

/* ---------------- 로그인 모달의 아이디저장/아이디찾기/비밀번호찾기 (login_modal.php 공용) ----------------
   auth.css(login.php 전용)와 클래스명이 겹치는데(예: .inputCover) 두 스타일시트를 같이 로드하면
   서로 덮어써서 값이 페이지마다 뒤죽박죽 되므로, auth.css를 로드하는 대신 subscribe.css에서
   쓰는 값(--sb-*)으로 auth.css의 해당 규칙만 옮겨왔다(auth.css는 이 클래스들과 무관하게 유지). */
.customChkBox { display: inline-flex; align-items: center; }
.customChkBox > input[type="checkbox"] { display: none; }
.customChkBox > label { position: relative; height: 22px; line-height: 22px; padding-left: 30px; margin: 0; cursor: pointer; }
.customChkBox > label::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 22px; background: url("/images/check.png") no-repeat center / contain; }
.customChkBox > input[type="checkbox"]:checked + label::before { background-image: url("/images/check_on.png"); }

.loginOption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 0 0; }
.loginOption > .saveArea > label { font-size: 14px; }
.loginOption > .findArea { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.loginOption > .findArea > li { font-size: 14px; position: relative; padding: 0 10px; list-style: none; }
.loginOption > .findArea > li:first-child { padding-left: 0; }
.loginOption > .findArea > li:last-child { padding-right: 0; }
.loginOption > .findArea > li:not(:first-child)::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 12px; background: #707070; }
.loginOption > .findArea > li > a { color: var(--sb-text); text-decoration: none; }
.loginOption > .findArea > li > a:hover { color: var(--sb-blue); }

/* 좁은 화면(모바일)에서 로그인 팝업(.sb-modal, max-width 440px)의 실제 콘텐츠 폭이
   충분히 넓지 않으면 아이디저장/아이디찾기/비밀번호찾기가 두 줄로 꺾이며 높이가 늘어나고,
   팝업 자체의 max-height(82vh)와 겹쳐 회원가입 버튼이 화면 밖으로 밀려나는 문제가 있었음
   (2026-09-09 실기기 확인). space-between 대신 명확히 두 줄로 쌓고, 줄 간격/여백을 줄여서
   늘어난 높이를 최소화한다. */
@media (max-width: 480px) {
  .sb-modal .modal-body { padding: 18px 20px 22px; }
  .loginOption { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 10px; }
}

.email-auth-wrapper { display: flex; align-items: center; margin-bottom: 5px; }
.email-auth-wrapper input { flex: 1; }
.timer { display: block; margin-top: 10px; font-size: 16px; font-weight: 600; color: var(--sb-blue); }
.found-email { margin: 24px 0 5px; font-size: 24px; font-weight: 500; text-align: center; color: var(--sb-text); }
#resetPasswordConfirmBtn { background-color: var(--sb-blue); color: #fff; }
.emailResultMessage,
.resetResultMessage { font-size: 19px; font-weight: 600; text-align: center; color: var(--sb-text); }
.btnArea div.mt-3 { color: #ff0000; font-weight: 500; font-size: 18px; text-align: center; margin-top: 16px; }
#resetPasswordResult { font-size: 13px; text-align: center; margin-top: 8px; }

/* 결제카드 등록 폼 */
.customer-type-toggle {
  display: flex;
  border: 1px solid var(--sb-input-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}

.customer-type-toggle button {
  flex: 1;
  height: 44px;
  border: 0;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  color: var(--sb-text);
  cursor: pointer;
}

.customer-type-toggle button:first-child {
  border-right: 1px solid var(--sb-input-border);
}

.customer-type-toggle button.active {
  background: var(--sb-blue);
  color: #fff;
}

.cardForm .formArea {
  display: block;
  width: 100%;
  margin-top: 14px;
}

.cardForm .formArea > label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cardForm .formArea input,
.cardForm .formArea select {
  height: 42px;
  width: 100%;
  background: #fff;
  box-sizing: border-box;
  border: 1px solid var(--sb-input-border);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 15px;
}

.cardForm .formArea .cardNumber {
  display: flex;
  gap: 6px;
}

.cardForm .formArea .cardNumber > input {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.form-mpRow {
  display: flex;
  gap: 16px;
}

.form-mpRow .formArea {
  flex: 1;
  min-width: 0;
}

.form-mpRow .formArea > div {
  display: flex;
  gap: 6px;
}

.form-mpRow .formArea input {
  flex: 1;
  min-width: 0;
  text-align: center;
}

/* ---------------- 결제/무료체험 완료 페이지 ---------------- */

.sb-complete {
  /* 레거시 .subscribe-complete-container/.free-trial-container는 57.2917vw(1920px 기준 ~1100px) —
     .sb-page의 기본 max-width(1080px)와 사실상 같은 값이라 별도로 좁힐 이유가 없었음(과거 버그).
     좁혀뒀던 탓에 subscribe-complete.php 결제내역 표가 컨테이너 폭을 넘어 가로 스크롤이 생겼음. */
  text-align: left;
}

.sb-complete h4 {
  font-size: 27px;
  font-weight: 700;
  margin: 0 0 20px;
}

.sb-complete h6.sb-complete-sub {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
}

.pc-only-notice {
  font-size: 14px;
  line-height: 1.6;
  color: var(--sb-text-soft);
  background-color: #f5f6f8;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 28px;
}

.subscribe-complete-table-container {
  margin-bottom: 20px;
  overflow-x: auto;
}

.subscribe-complete-table,
.free-trial-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 17px;
}

.subscribe-complete-table th,
.subscribe-complete-table td,
.free-trial-table th,
.free-trial-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--sb-border-light);
  text-align: left;
  white-space: nowrap;
}

.subscribe-complete-table th,
.free-trial-table th {
  font-weight: 700;
}

/* 헤더(결제 수단/결제 일시/결제 금액/영수증) 타이틀 크기는 그대로 유지하고,
   실제 데이터 행 내용만 살짝 줄임 */
.subscribe-complete-table td,
.free-trial-table td {
  font-size: 15px;
}

.no-payments-message {
  text-align: center;
  font-size: 14px;
  color: var(--sb-text-soft);
  padding: 16px 0;
}

.receipt-btn {
  padding: 6px 12px;
  font-size: 15px;
  color: #fff;
  background-color: var(--sb-blue);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* 레거시 .receipt-modal(오버레이)는 배경 0.4 하나뿐 — 사이트 공통 오버레이(0.65,
   Bootstrap 이중배경 합성값)보다 옅게 별도 지정 */
.receipt-modal-overlay { background: rgba(0, 0, 0, 0.4); }

.receipt-modal.modal-box {
  /* 레거시 .receipt-modal-content 실측: 41.6667vw(1920px 기준 800px), #fefefe 배경,
     1px #888 테두리, 그림자 없음, 각진 모서리 — 사이트 공통 모달(둥근 모서리·그림자) 대신 재현 */
  max-width: 800px;
  width: 90%;
  background: #fefefe;
  border: 1px solid #888;
  border-radius: 0;
  box-shadow: none;
}

.receipt-modal .modal-close {
  /* 레거시는 헤더바 없이 콘텐츠 우상단에 겹쳐 뜨는 × 하나뿐 */
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 1;
}

.receipt-modal .modal-body {
  padding: 20px;
  display: flex;
}

.receipt-iframe {
  width: 100%;
  height: 70vh;
  min-height: 320px;
  border: none;
  display: block;
  flex: 1;
}

.subscribe-complete-buttons,
.free-trial-buttons {
  display: flex;
  gap: 16px;
  margin: 28px 0;
}

.subscribe-complete-buttons button,
.subscribe-complete-buttons a,
.free-trial-buttons button,
.free-trial-buttons a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  border-radius: 8px;
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.subscribe-complete-buttons .service-guide-btn,
.free-trial-buttons .service-guide-btn {
  color: var(--sb-blue);
  border: 1px solid var(--sb-blue);
  background-color: #fff;
}

.subscribe-complete-buttons .download-btn,
.free-trial-buttons .download-btn {
  color: #fff;
  background-color: var(--sb-blue);
  border: 1px solid var(--sb-blue);
}

/* 무료체험 신청완료 상세 안내 */
.free-trial-confirm {
  margin-bottom: 32px;
}

.free-trial-confirm > div:not(:first-child) {
  padding-top: 20px;
}

.free-trial-confirm h5 {
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 8px;
}

.free-trial-confirm h6 {
  font-size: 18px;
  font-weight: 700;
  padding-left: 12px;
  box-sizing: border-box;
  position: relative;
  margin: 0 0 4px;
}

.free-trial-confirm h6::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: var(--sb-text);
}

.free-trial-confirm ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.free-trial-confirm ul > li {
  font-size: 17px;
  line-height: 1.7;
  box-sizing: border-box;
  padding-left: 12px;
}

.free-trial-confirm p {
  font-size: 18px;
  color: var(--sb-red);
  padding-left: 12px;
  box-sizing: border-box;
  position: relative;
  margin: 0;
}

.free-trial-confirm p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: var(--sb-red);
}

/* ---------------- 반응형 (사이트 전역 브레이크포인트: 960px / 720px) ---------------- */

@media (max-width: 960px) {
  .sb-page {
    padding: 32px 20px 72px;
  }

  .sbForm > div {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sbFormRight {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .subscribe-complete-buttons,
  .free-trial-buttons {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .sb-page {
    padding: 24px 16px 64px;
  }

  .sb-page h1.sb-page-title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .sbFormLeft h4 {
    font-size: 21px;
    padding-bottom: 18px;
  }

  .sbFormLeft h5 {
    font-size: 17px;
  }

  .sbFormLeft .sbRow {
    grid-template-columns: 40% 60%;
  }

  .sbFormLeft .sbRow > div > h6 {
    font-size: 14px;
  }

  .sbFormRight > div,
  .planCard {
    padding: 22px 20px 26px;
  }

  .sbFormRight h4 {
    font-size: 26px;
  }

  .sbFormRight button,
  .sbFormRight > div > button {
    height: 50px;
    font-size: 18px;
  }

  .cardForm .formArea .cardNumber {
    flex-wrap: wrap;
  }

  .cardForm .formArea .cardNumber > input {
    flex-basis: calc(50% - 3px);
  }

  .form-mpRow {
    flex-direction: column;
    gap: 14px;
  }

  .sb-complete h4 {
    font-size: 20px;
  }
}
