@charset "utf-8";
/* certpass.css — 본인인증 자체 화면 공용 스타일 (전 업체 공용, _skin/_base 의 cert/direct-panel · cert/direct-page)
   업체별로 바꾸는 값은 아래 변수뿐. 업체 스킨 common.css 의 :root 에 정의하면 이 파일의 기본값을 대신한다.
     --cert-theme       테마색 (PC 상단 바, 주요 버튼, 선택 링, 입력 포커스)
     --cert-theme-text  테마색 위 글자색
     --cert-error       오류색
     --cert-radius      모서리
   인증수단은 config certpass.methods. 좌측 하단 로고·이름은 인증 제공 업체(CertPassDirectService::vendor). */

/* ── 입력 (PC·MO 공용) ───────────────────────── */
.cert-field { display: block; margin-bottom: 16px; }
.cert-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #222;
}
.cert-input,
.cert-select {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--cert-radius, 8px);
    font: inherit;
    font-size: 15px;
    color: #222;
    transition: border-color 0.15s;
}
.cert-input::placeholder { color: #aaa; }
.cert-select {
    padding-right: 36px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}
.cert-input:focus,
.cert-select:focus { outline: none; border-color: var(--cert-theme, #222); }
.cert-input[aria-invalid="true"],
.cert-select[aria-invalid="true"] { border-color: var(--cert-error, #e7000b); }
.cert-field__help { display: block; margin-top: 6px; font-size: 12px; color: #888; }
.cert-field__error { display: block; margin-top: 6px; font-size: 12px; color: var(--cert-error, #e7000b); }
.cert-notice { margin-top: 12px; font-size: 13px; color: var(--cert-error, #e7000b); }
.cert-agree { margin-top: 4px; padding: 12px 14px; background: #f7f7f7; border-radius: var(--cert-radius, 8px); }
.cert-agree__all {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    padding: 3px 0 8px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    cursor: pointer;
}
.cert-agree__all input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--cert-theme, #222); }
.cert-agree__item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; }
.cert-agree__check {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #222;
    cursor: pointer;
}
.cert-agree__check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--cert-theme, #222);
}
.cert-agree__check em { font-style: normal; font-weight: 600; color: var(--cert-theme, #222); }
.cert-agree__view {
    flex: 0 0 auto;
    display: inline-flex;
    padding: 4px;
    background: none;
    border: 0;
    color: #999;
    cursor: pointer;
}
.cert-agree__view svg { width: 18px; height: 18px; stroke-width: 2; }
.cert-agree__view:hover { color: #222; }

/* 동의 본문 레이어 팝업 (PC·MO 공용, cert/terms) */
.cert-layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}
.cert-layer__box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    max-height: 80vh;
    overflow: hidden;
    background: #fff;
    border-radius: var(--cert-radius, 8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}
.cert-layer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 16px 16px 16px 20px;
    border-bottom: 1px solid #eee;
}
.cert-layer__title { margin: 0; font-size: 16px; font-weight: 700; color: #222; }
.cert-layer__close { display: inline-flex; padding: 4px; background: none; border: 0; color: #222; cursor: pointer; }
.cert-layer__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; }
.cert-layer__foot { flex-shrink: 0; padding: 12px 20px 16px; border-top: 1px solid #eee; }
.cert-terms__text { font-size: 13px; line-height: 1.6; color: #444; }
.cert-terms__text p { margin: 0 0 12px; }
.cert-terms__text dl { margin: 0 0 12px; }
.cert-terms__text dt { margin-top: 10px; font-weight: 600; color: #222; }
.cert-terms__text dd { margin: 2px 0 0; }
.cert-terms__text strong { color: var(--cert-theme, #222); }
.cert-loading { padding: 40px 0; text-align: center; font-size: 14px; color: #888; }

.cert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 16px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--cert-radius, 8px);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.cert-btn--main {
    background: var(--cert-theme, #222);
    border-color: var(--cert-theme, #222);
    color: var(--cert-theme-text, #fff);
}
.cert-btn--block { width: 100%; }
.cert-btn:disabled { cursor: default; opacity: 0.35; }

/* 다음 입력 칸이 위에서 살짝 내려오며 나타남 (MO, x-transition enter 클래스) */
.cert-reveal { transition: opacity 260ms ease-out, transform 260ms ease-out; }
.cert-reveal--from { opacity: 0; transform: translateY(-8px); }
.cert-reveal--to { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .cert-reveal { transition: none; }
}

/* ── PC: cert/direct-panel ───────────────────────
   좌: 인증 방법 아이콘 그리드 + 하단 업체 로고 / 우: 상단 바(고른 인증사 + 닫기)·입력·하단 버튼.
   창 높이 고정(내용은 안쪽 스크롤) — 인증사 선택·오류 문구·대기 전환에도 크기가 변하지 않게 */
.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cert-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.cert-direct {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 820px;
    height: min(720px, 90vh);
    overflow: hidden;
    background: #fff;
    border-radius: var(--cert-radius, 8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.cert-direct__methods {
    display: flex;
    flex-direction: column;
    flex: 0 0 340px;
    padding: 24px;
    box-sizing: border-box;
    border-right: 1px solid #eee;
    overflow-y: auto;
}
.cert-direct__title {
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    font-weight: 700;
    color: #222;
}
.cert-direct__pick {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 8px;
}
.cert-direct__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: 12px;
    color: #222;
    cursor: pointer;
}
.cert-direct__card:disabled { cursor: default; opacity: 0.5; }
.cert-direct__card.is-selected:disabled { opacity: 1; }
.cert-direct__card:focus-visible { outline: none; }
.cert-direct__iconbox {
    display: block;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 0 0 1px #eee;
    transition: box-shadow 0.15s, transform 0.15s;
}
.cert-direct__iconbox img { display: block; width: 100%; height: 100%; }
.cert-direct__card:hover .cert-direct__iconbox { transform: translateY(-2px); }
.cert-direct__card:focus-visible .cert-direct__iconbox { box-shadow: 0 0 0 3px #ccc; }
.cert-direct__card.is-selected .cert-direct__iconbox { box-shadow: 0 0 0 3px var(--cert-theme, #222); }
.cert-direct__card.is-selected .cert-direct__name { font-weight: 700; }
.cert-direct__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert-direct__brand { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; min-width: 0; }
.cert-direct__brand img { display: block; flex: none; height: 16px; width: auto; }
.cert-direct__company {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #666;
}

.cert-direct__main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cert-direct__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    height: 60px;
    padding: 0 16px 0 24px;
    background: var(--cert-theme, #222);
    color: var(--cert-theme-text, #fff);
}
.cert-direct__picked {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}
.cert-direct__picked img { border-radius: 6px; }
.cert-direct__close {
    display: inline-flex;
    padding: 6px;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    opacity: 0.85;
}
.cert-direct__close:hover { opacity: 1; }
.cert-direct__content { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 16px; }
.cert-direct__content .cert-field { margin-bottom: 12px; }
.cert-direct__heading { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: #222; }
.cert-direct__phone { display: flex; gap: 8px; }
.cert-direct__phone .cert-select { flex: 0 0 110px; }
.cert-direct__phone .cert-input { flex: 1; min-width: 0; }
.cert-direct__agree {
    flex-shrink: 0;
    margin: 0;
    padding: 10px 24px;
    border-top: 1px solid #eee;
    border-radius: 0;
}
.cert-direct__foot { display: flex; flex-shrink: 0; height: 56px; border-top: 1px solid #eee; }
.cert-direct__btn {
    flex: 1;
    background: #fff;
    border: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    cursor: pointer;
}
.cert-direct__btn--main {
    flex: 2;
    background: var(--cert-theme, #222);
    color: var(--cert-theme-text, #fff);
    transition: opacity 0.15s;
}
.cert-direct__btn--main:disabled { cursor: default; opacity: 0.35; }
@media (max-width: 760px) {
    .cert-direct { flex-direction: column; height: 90vh; }
    .cert-direct__methods { flex: 0 0 auto; border-right: 0; border-bottom: 1px solid #eee; }
    .cert-direct__main { min-height: 0; }
}

/* ── 승인 대기 안내 cert/waiting (web 3단계 · mo 휴대폰 그림) ── */
.cert-wait { text-align: center; color: #222; }
.cert-direct__wait { display: flex; flex-direction: column; justify-content: center; min-height: 100%; }
.cert-direct__wait .cert-wait { padding: 8px 0 16px; }
.cert-wait__title { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.cert-wait__desc { margin: 0 0 32px; font-size: 14px; line-height: 1.6; color: #555; }
.cert-wait__steps { display: flex; gap: 24px; margin: 0 0 36px; padding: 0; list-style: none; }
.cert-wait__step {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.cert-wait__step + .cert-wait__step::before {
    content: '';
    position: absolute;
    top: 35px;
    left: -16px;
    border: 5px solid transparent;
    border-left: 7px solid #444;
}
.cert-wait__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 128px;
    height: 80px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 40px;
    box-sizing: border-box;
}
.cert-wait__icon svg { width: 40px; height: 40px; stroke-width: 1.6; }
.cert-wait__badge { position: absolute; top: -10px; right: -6px; width: 30px; height: 30px; border-radius: 8px; }
.cert-wait__no { font-size: 13px; font-weight: 700; color: #888; }
.cert-wait__text { margin-top: 4px; font-size: 14px; line-height: 1.45; word-break: keep-all; }
.cert-wait__help {
    padding: 18px 20px;
    background: #f7f7f7;
    border: 1px solid #eee;
    border-radius: var(--cert-radius, 8px);
    text-align: left;
    font-size: 13px;
    line-height: 1.7;
    color: #555;
}
.cert-wait__help-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #333; }
.cert-wait__help ol { margin: 0; padding-left: 18px; }
.cert-wait__help li { list-style: decimal; }
.cert-page__wait {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 240px);
    min-height: calc(100svh - 240px);
}
.cert-wait--mo .cert-wait__desc { margin-bottom: 36px; font-size: 16px; line-height: 1.6; color: #222; }
.cert-wait--mo .cert-wait__help { font-size: 14px; word-break: keep-all; }
.cert-wait--mo .cert-wait__help-title { font-size: 15px; }
.cert-wait__phone { position: relative; width: 120px; height: 200px; margin: 0 auto 36px; color: #333; }
.cert-wait__phone svg { display: block; width: 100%; height: 100%; }
.cert-wait__open { margin-bottom: 16px; }
.cert-wait__logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    transform: translate(-50%, -50%);
}

/* ── MO: cert/direct-page ────────────────────────
   한 화면: 인증 방법 카드 → 이름 → 생년월일 → (PASS 면 통신사) 휴대폰. 단계 버튼은 하단 고정 바 */
.cert-page { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
.cert-page .cert-input,
.cert-page .cert-select { font-size: 16px; scroll-margin: 80px 0 120px; }
.cert-page__lead { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: #222; }
.cert-page__desc { margin: 4px 0 20px; font-size: 13px; color: #888; }
.cert-pick {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.cert-pick__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 8px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--cert-radius, 8px);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #222;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cert-pick__item:active { background: #f6f6f6; }
.cert-pick__item.is-selected {
    border-color: var(--cert-theme, #222);
    box-shadow: inset 0 0 0 1px var(--cert-theme, #222);
}
.cert-pick__icon { width: 44px; height: 44px; border-radius: 10px; }
.cert-pick__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert-form { margin-top: 24px; }
.cert-bottombar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    max-width: var(--container-max, none);
    margin: 0 auto;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #eee;
}
.cert-actions { display: flex; gap: 8px; }
.cert-actions__back { flex: 0 0 48px; width: 48px; padding: 0; }
.cert-actions__back svg { width: 22px; height: 22px; stroke-width: 1.5; }
.cert-actions__main { flex: 1; min-width: 0; }

/* MO 통신사: select 대신 버튼 + 바텀시트 */
.cert-select--sheet { text-align: left; cursor: pointer; }
.cert-select__placeholder { color: #aaa; }
.cert-sheet__backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, 0.45); }
.cert-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1101;
    max-width: var(--container-max, none);
    margin: 0 auto;
    padding: 24px 20px calc(16px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 20px 20px 0 0;
}
.cert-sheet-move { transition: transform 260ms ease-out; }
.cert-sheet--down { transform: translateY(100%); }
.cert-sheet--up { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .cert-sheet-move { transition: none; }
}
.cert-sheet__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.cert-sheet__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; color: #222; }
.cert-sheet__close { flex: 0 0 auto; margin: -2px -4px 0 0; padding: 4px; background: none; border: 0; color: #222; }
.cert-sheet__agree { margin: 16px 0; }
.cert-sheet__desc { margin: 16px 0 8px; font-size: 14px; color: #666; }
.cert-sheet__list { list-style: none; margin: 0; padding: 0; }
.cert-sheet__option {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 4px;
    background: none;
    border: 0;
    border-bottom: 1px solid #f2f2f2;
    font: inherit;
    font-size: 16px;
    color: #222;
    text-align: left;
}
.cert-sheet__list li:last-child .cert-sheet__option { border-bottom: 0; }
.cert-sheet__option.is-selected { font-weight: 700; color: var(--cert-theme, #222); }
