/* 신청 서비스 목록·상세·신청·결과 조회. 색·글꼴은 layout.css 변수를 쓴다. */

.as-page, .as-page * { font-family: var(--ot-font); }
.as-page { color: var(--ot-text); font-size: 16px; line-height: 1.6; }
.as-page h2 { margin: 56px 0 16px; font-size: 32px; font-weight: 800; line-height: 1.3; text-align: left; word-break: keep-all; }
.as-page h3 { margin-top: 0; font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--ot-text); }
.as-page a { color: inherit; }
.as-page [hidden] { display: none !important; }
.as-form-box.is-single-step .fb-step-heading, .as-form-box.is-single-step .fb-step-nav { display: none !important; }
.as-lead { margin-bottom: 28px; color: var(--ot-text-sub); font-size: 17px; }
.as-sub { color: #767676; font-size: 14px; }
.as-breadcrumb { margin-top: 40px; font-size: 14px; color: #767676; }
.as-breadcrumb a:hover, .as-breadcrumb a:focus-visible { color: var(--ot-primary-dark); text-decoration: underline; }
.as-breadcrumb + h2 { margin-top: 12px; }

.as-mock-note, .as-stale-note { margin: 16px 0; padding: 10px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.as-mock-note { background: #fff7e0; color: #7a5b00; }
.as-stale-note { background: #eef4ff; color: #2c4a7a; }
.as-notice { margin-top: 14px; padding: 14px 16px; border-left: 4px solid var(--ot-primary); background: #f3faf8; font-size: 15px; line-height: 1.6; }
.as-message { min-height: 24px; margin-top: 12px; font-size: 15px; color: var(--ot-text-sub); text-align: center; }
.as-message.is-error { color: #c62828; }

/* 버튼 */
.as-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 44px; padding: 0 20px; border: 1px solid #cfd8d6; border-radius: 22px; background: #fff; color: var(--ot-text) !important; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; }
.as-btn:hover, .as-btn:focus-visible { border-color: var(--ot-primary); color: var(--ot-primary-dark) !important; }
.as-btn.primary { background: var(--ot-primary); border-color: var(--ot-primary); color: #fff !important; }
.as-btn.primary:hover, .as-btn.primary:focus-visible { background: var(--ot-primary-dark); border-color: var(--ot-primary-dark); color: #fff !important; }
.as-btn.large { height: 52px; min-width: 160px; border-radius: 26px; font-size: 17px; }
.as-btn.is-disabled, .as-btn:disabled { background: #e9ecef !important; border-color: #e9ecef !important; color: #9aa0a6 !important; cursor: not-allowed; }

/* 상태 표시 */
.as-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; background: #eef1f3; color: #5f6b72; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; }
.as-badge.status-open { background: #e3f6f1; color: #12795f; }
.as-badge.status-upcoming { background: #eef4ff; color: #2c4a7a; }
.as-badge.status-suspended { background: #fff3e0; color: #a35a00; }
.as-badge.review-received { background: #eef4ff; color: #2c4a7a; }
.as-badge.review-approved { background: #e3f6f1; color: #12795f; }
.as-badge.review-rejected { background: #fdecea; color: #b3261e; }

/* 빈 목록·오류 */
.as-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 20px; border: 1px solid var(--ot-line); border-radius: 16px; background: #fafafa; text-align: center; color: var(--ot-text-sub); }
.as-empty.is-error strong { color: var(--ot-text); }

/* 목록 */
.as-list { display: flex; flex-direction: column; gap: 16px; }
.as-row { display: flex; align-items: center; gap: 24px; padding: 24px 28px; border: 1px solid var(--ot-line); border-radius: 16px; background: #fff; }
.as-row-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.as-row-title { font-size: 21px; font-weight: 700; line-height: 1.4; word-break: keep-all; }
.as-row-main:hover .as-row-title, .as-row-main:focus-visible .as-row-title { color: var(--ot-primary-dark); text-decoration: underline; text-underline-offset: 4px; }
.as-row-summary { color: var(--ot-text-sub); font-size: 15px; }
.as-row-period { color: #767676; font-size: 14px; }
.as-row-actions { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }

/* 상세 */
.as-summary-card { padding: 28px; border: 1px solid var(--ot-line); border-radius: 16px; background: #fff; box-shadow: 0 4px 15px rgba(0, 0, 0, .06); }
.as-facts { display: grid; gap: 10px; }
.as-facts > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.as-facts dt { color: #767676; font-size: 15px; }
.as-facts dd { font-size: 16px; font-weight: 500; }
.as-facts > .as-reason-row { align-items: start; }
.as-reason { padding: 12px 14px; border-radius: 10px; background: #fdecea; color: #8c1d18; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.as-summary { margin-top: 18px; font-size: 16px; color: var(--ot-text); }
.as-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.as-closed-reason { margin-top: 10px; }
.as-guide { margin-top: 32px; }
.as-guide-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.as-guide-head h3 { margin: 0; padding: 0; }
.as-guide-head a { font-size: 14px; color: var(--ot-primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.as-guide-frame { display: block; width: 100%; height: 900px; max-height: 80vh; border: 1px solid var(--ot-line); border-radius: 12px; background: #fff; }
.as-sticky-actions { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: center; gap: 10px; margin: 24px -15px 0; padding: 12px 15px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--ot-line); }

/* 신청서 (form-renderer.js) */
.as-form-box { margin-top: 24px; padding: 32px; border: 1px solid var(--ot-line); border-radius: 16px; background: #fff; }
.as-form-box .fb-customer-form { display: block; }
.as-form-box .fb-step-heading:empty, .as-form-box .fb-step-heading p:empty { display: none; }
.as-form-box .fb-step-title { font-size: 18px; margin-bottom: 12px; }
.as-form-box .fb-preview-field { margin-bottom: 24px; }
.as-form-box .fb-preview-field[hidden] { display: none !important; }
.as-form-box .fb-field-label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 700; }
.as-form-box .fb-control { display: block; width: 100%; height: auto; min-height: 48px; padding: 11px 14px; border: 1px solid #cfd8d6; border-radius: 10px; background: #fff; font-size: 16px; line-height: 1.5; text-indent: 0; }
.as-form-box textarea.fb-control { min-height: 120px; resize: vertical; }
.as-form-box .fb-control:read-only { background: #f3f6f7; color: #555; }
.as-form-box .fb-control:focus { outline: 2px solid var(--ot-primary); outline-offset: 1px; border-color: var(--ot-primary); }
.as-form-box input[type="file"].fb-control { width: 100%; height: auto; padding: 10px; }
.as-form-box .fb-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; border: 0; padding: 0; margin: 0; }
.as-form-box .fb-check { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; cursor: pointer; }
.as-form-box .fb-check input[type="radio"], .as-form-box .fb-check input[type="checkbox"], .as-form-box .fb-toggle input { position: static; width: 20px; height: 20px; margin: 0; padding: 0; overflow: visible; clip: auto; accent-color: var(--ot-primary); flex-shrink: 0; }
.as-form-box .fb-check input + span::before { display: none; }
.as-form-box .fb-terms-body { max-height: 200px; overflow: auto; padding: 16px; border: 1px solid var(--ot-line); border-radius: 10px; background: #f7f9fa; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.as-form-box .fb-help { margin: 8px 0; color: #767676; font-size: 14px; }
.as-form-box .fb-count { margin-top: 4px; color: #9aa0a6; font-size: 12px; text-align: right; }
.as-form-box .fb-error { margin-top: 6px; color: #c62828; font-size: 14px; white-space: pre-wrap; }
.as-form-box .fb-error:empty { display: none; }
.as-form-box .fb-signature { display: block; width: 100%; height: 160px; margin: 8px 0; border: 1px dashed #90a5af; border-radius: 10px; background: #fcfdfd; touch-action: none; }
.as-form-box .fb-button { min-height: 44px; padding: 0 18px; border: 1px solid #cfd8d6; border-radius: 10px; background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.as-form-box .fb-button.primary { background: var(--ot-primary); border-color: var(--ot-primary); color: #fff; }
.as-form-box .fb-button:disabled { background: #e9ecef; color: #9aa0a6; cursor: not-allowed; }
.as-form-box .fb-step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.as-form-box .fb-step-nav[hidden] { display: none; }
.as-form-box .fb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.as-submit { display: flex; justify-content: center; margin-top: 28px; }

.as-done { margin-top: 24px; padding: 32px; border: 2px solid var(--ot-primary); border-radius: 16px; background: #f3faf8; }
.as-done:focus { outline: none; }
.as-done h3 { margin-bottom: 18px; }
.as-receipt { font-size: 28px; font-weight: 800; letter-spacing: 2px; color: var(--ot-primary-dark); }

/* 결과 조회 */
.as-result-form { max-width: 520px; padding: 28px; border: 1px solid var(--ot-line); border-radius: 16px; background: #fff; }
.as-field { margin-bottom: 18px; }
.as-field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 700; }
.as-field input { display: block; width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cfd8d6; border-radius: 10px; font-size: 16px; line-height: 46px; text-indent: 0; }
.as-field input:focus { outline: 2px solid var(--ot-primary); outline-offset: 1px; border-color: var(--ot-primary); }
.as-result .as-done { max-width: 520px; }

@media screen and (max-width: 960px) {
  .as-page { font-size: 15px; }
  .as-page h2 { margin-top: 28px; font-size: 24px; }
  .as-breadcrumb { margin-top: 20px; }
  .as-lead { font-size: 15px; }
  .as-row { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; }
  .as-row-title { font-size: 18px; }
  .as-row-actions { flex-direction: row; }
  .as-row-actions .as-btn { flex: 1 1 0; min-width: 0; }
  .as-summary-card, .as-form-box, .as-result-form, .as-done { padding: 20px; }
  .as-facts > div { grid-template-columns: 80px 1fr; }
  .as-actions .as-btn { flex: 1 1 0; min-width: 0; }
  .as-guide-frame { height: 70vh; }
  .as-sticky-actions .as-btn { flex: 1 1 0; min-width: 0; }
}
