/* 곽봉준 강의 결제(수강 신청) 공용 스타일 — 상세 팝업 내 패널(.detail-checkout)과 단독 페이지(checkout.html) 공용.
   색상은 상세 팝업과 동일한 어두운 테마(#181818 / #222 / #2c2c2e / 포인트 #C81A27). 토스 결제위젯이 흰색이므로 '결제 수단' 카드(.kc-card-pay)만 흰색 */
.kc, .kc-head, .kc-page { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Helvetica Neue', sans-serif; color: #fff; -webkit-font-smoothing: antialiased; }
.kc *, .kc *::before, .kc *::after { box-sizing: border-box; }
.kc button { font-family: inherit; cursor: pointer; }
.kc a { text-decoration: none; }

/* ── 상세 팝업 안의 결제 패널 ── */
.detail-checkout { display: none; background: #181818; min-height: 420px; text-align: left; }
.detail-modal.checkout-mode > *:not(.detail-checkout) { display: none !important; }
.detail-modal.checkout-mode > .detail-checkout { display: block; }
.kc-head { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px 0 12px; background: #181818; border-bottom: 1px solid #333; }
.kc-head-back { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 8px; border: none; background: transparent; border-radius: 10px; font-size: 14px; font-weight: 600; color: #ddd; transition: background .15s; }
.kc-head-back:hover { background: #2c2c2e; color: #fff; }
.kc-head-back svg { width: 18px; height: 18px; }
.kc-head-title { flex: 1; text-align: center; font-size: 16px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.kc-head-close { width: 38px; height: 38px; border: none; background: #2c2c2e; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: background .15s; }
.kc-head-close:hover { background: #3a3a3c; }
.kc-head-close svg { width: 16px; height: 16px; }

/* ── 결제 본문 ── */
.kc { max-width: 760px; margin: 0 auto; padding: 24px 24px 40px; line-height: 1.55; }
.kc-card { background: #222; border: 1px solid #333; border-radius: 12px; padding: 24px; margin-bottom: 16px; }
.kc-card-title { font-size: 17px; font-weight: 700; margin: 0 0 16px; color: #fff; letter-spacing: -0.01em; }
.kc-order { display: flex; gap: 16px; align-items: flex-start; }
.kc-order img { width: 176px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #111; }
.kc-order-title { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.4; }
.kc-order-meta { font-size: 13px; color: #aaa; margin-top: 4px; }
.kc-notice-box { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #C81A27; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.65; word-break: keep-all; }
.kc-order-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.kc-order-tags span { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: #2c2c2e; color: #ccc; }
.kc-sub-label { font-size: 14px; font-weight: 400; color: #aaa; margin: 20px 0 2px; }
.kc-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid transparent; border-radius: 8px; margin-top: 6px; cursor: pointer; background: #2c2c2e; transition: all .2s; }
.kc-opt:hover { background: #333; }
.kc-opt.active { border-color: #C81A27; background: #2a1a1a; }
.kc-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #666; flex-shrink: 0; position: relative; }
.kc-opt.active .kc-radio { border-color: #C81A27; }
.kc-opt.active .kc-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #C81A27; }
.kc-opt-body { flex: 1; min-width: 0; }
.kc-opt-name { font-size: 14px; font-weight: 600; color: #fff; }
.kc-opt-sub { font-size: 12px; color: #999; margin-top: 2px; }
.kc-opt-price { text-align: right; white-space: nowrap; }
.kc-opt-price b { font-size: 16px; font-weight: 700; color: #fff; }
.kc-opt-price s { display: block; font-size: 12px; color: #666; }
.kc-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 4px; background: #C81A27; color: #fff; margin-right: 6px; vertical-align: 2px; }
.kc-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #aaa; padding: 7px 0; }
.kc-row span:last-child { color: #fff; font-weight: 500; }
.kc-row .kc-disc { color: #4ade80; font-weight: 600; }
.kc-row.total { border-top: 1px solid #333; margin-top: 8px; padding-top: 16px; font-size: 16px; color: #fff; font-weight: 600; }
.kc-row.total b { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.kc-install { font-size: 12px; color: #666; margin-top: 8px; text-align: right; }

/* 결제 수단 카드만 흰색 (토스 결제위젯 배경색과 맞춤) */
.kc-card-pay { background: #fff; border-color: #fff; padding: 4px 0 12px; }
.kc-card-pay .kc-card-title { color: #191f28; padding: 0 24px; margin-bottom: 0; }
.kc-card-pay .kc-widget { min-height: 160px; }
.kc-card-pay .kc-agreement { margin-top: 4px; }
.kc-card-pay .kc-note { color: #6b7684; }

.kc-pay { width: 100%; padding: 17px; border: none; border-radius: 8px; background: #C81A27; color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all .2s; }
.kc-pay:hover { background: #a01520; }
.kc-pay:active { transform: scale(.995); }
.kc-pay:disabled { opacity: .45; cursor: not-allowed; }
.kc-pay svg { width: 20px; height: 20px; }
.kc-note { font-size: 12px; color: #777; text-align: center; margin: 12px 0 0; line-height: 1.7; }
.kc-secure { display: flex; align-items: center; justify-content: center; gap: 6px; }
.kc-secure svg { width: 14px; height: 14px; color: #4ade80; }

/* 상태 화면(로그인 필요·이미 수강 중·오류 등) */
.kc-state { background: #222; border: 1px solid #333; border-radius: 12px; padding: 48px 24px; text-align: center; }
.kc-state-icon { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; background: #2c2c2e; }
.kc-state-icon svg { width: 28px; height: 28px; color: #ddd; }
.kc-state h3 { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 10px; }
.kc-state p { font-size: 14px; color: #aaa; margin: 0 0 24px; line-height: 1.7; }
.kc-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 140px; padding: 13px 22px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; background: #C81A27; color: #fff; margin: 4px; transition: all .2s; }
.kc-btn:hover { background: #a01520; }
.kc-btn.ghost { background: #2c2c2e; color: #fff; border: 1px solid #444; }
.kc-btn.ghost:hover { background: #3a3a3c; }
.kc-loading { padding: 80px 24px; text-align: center; font-size: 14px; color: #aaa; }
.kc-spin { width: 36px; height: 36px; border: 3px solid #333; border-top-color: #C81A27; border-radius: 50%; margin: 0 auto 16px; animation: kc-sp .9s linear infinite; }
@keyframes kc-sp { to { transform: rotate(360deg); } }

/* 단독 페이지(checkout.html) */
.kc-page { background: #181818; min-height: 100vh; margin: 0; }
.kc-topnav { position: sticky; top: 0; z-index: 10; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: rgba(24,24,24,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid #333; }
.kc-topnav .kc-head-title { font-size: 15px; }
.kc-topnav-spacer { width: 90px; }

/* 로그인 창은 상세 팝업(z-index 3000) 위에 떠야 함 (기존 2000이라 팝업 뒤에 가려지던 문제 수정) */
.login-modal-overlay { z-index: 3500 !important; }

@media (max-width: 640px) {
  .kc { padding: 16px 14px 32px; }
  .kc-card { padding: 18px 16px; }
  .kc-card-pay { padding: 2px 0 8px; }
  .kc-card-pay .kc-card-title { padding: 0 24px; }
  .kc-order { flex-direction: column; }
  .kc-order img { width: 100%; }
  .kc-opt { padding: 12px; gap: 10px; }
  .kc-opt-price b { font-size: 15px; }
  .kc-row.total b { font-size: 21px; }
  .kc-head { height: 54px; }
  .kc-head-back span { display: none; }
}

/* 무료 강의(0원) 안내 카드 */
.kc-card-free { padding: 18px 24px; }
.kc-free-msg { font-size: 14px; color: #ccc; display: flex; align-items: center; gap: 8px; }
.kc-free-msg::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }

/* 2026-11-01: 예약금 결제 강의 — 신청자 정보 입력 폼 */
.kc-apply .kc-apply-note { margin: -6px 0 16px; font-size: 13px; color: #aaa; line-height: 1.6; }
.kc-apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kc-field-full { grid-column: 1 / -1; }
.kc-label { display: block; font-size: 13px; color: #ccc; margin-bottom: 6px; }
.kc-label em, .kc-check em { font-style: normal; color: #C81A27; }
.kc-input { width: 100%; box-sizing: border-box; height: 46px; padding: 0 14px; background: #1c1c1e; border: 1px solid #3a3a3c; border-radius: 8px; color: #fff; font-size: 14px; font-family: inherit; outline: none; }
.kc-input:focus { border-color: #C81A27; }
.kc-input::placeholder { color: #666; }
select.kc-input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.8'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.kc-textarea { height: 360px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.kc-birth { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.kc-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; cursor: pointer; font-size: 13px; color: #aaa; line-height: 1.6; }
.kc-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: #C81A27; flex-shrink: 0; }
@media (max-width: 600px) { .kc-apply-grid { grid-template-columns: 1fr; } .kc-birth { gap: 6px; } }
