/* 인증·계정 페이지 공통 스타일.
   메인 페이지 디자인 언어(플랫 사각, 포인트 블루 #3090d6, 볼드 #333333)를 그대로 따른다.
   #279: 앱 화면(app.css)과 같은 규칙으로 바꿨다 — 색·모서리는 tokens.css 의 --wp-* 값,
   카드는 흰 바탕 + 1px 선(상단 4px 파란 바 제거), 버튼·입력칸은 높이 44px·8px 모서리. */

/* 계정 화면에서만 페이지 바탕을 옅은 회색으로(app.css 의 html:has(.wc-app) 과 같은 방식). */
html:has(.auth-wrap) { background: var(--wp-page); }

.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 55px 0 75px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background-color: #fff;
    border: 1px solid var(--wp-line);
    border-radius: var(--wp-radius-card);
    padding: 42px 40px 40px;
}

.auth-card--wide {
    max-width: 640px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--wp-ink);
    text-align: center;
    margin: 0 0 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--wp-muted);
    text-align: center;
    margin: 0 0 30px;
    line-height: 1.6;
    word-break: keep-all;
}

/* ── 폼 필드 ── */
.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-ink);
    margin-bottom: 6px;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--wp-ink);
    border: 1px solid var(--wp-input-line);
    border-radius: var(--wp-radius-control);
    background-color: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--wp-primary);
    box-shadow: 0 0 0 3px rgba(34, 119, 184, 0.18);
}

/* 입력칸 위 보조 안내(#406) */
.auth-help {
    margin: -2px 0 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--wp-ink-2);
    word-break: keep-all;
}

/* 그대로 입력할 확인 문구 — 굵은 글씨만으로는 라벨과 구분되지 않아 글자 상자로 둔다(#406) */
.confirm-phrase {
    display: inline-block;
    padding: 0 8px;
    border: 1px solid #e4b9b8;
    border-radius: 4px;
    background-color: #fdf4f4;
    color: #c9302c;
    font-weight: 700;
    line-height: 1.5;
}

.auth-field--checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-field--checkbox label {
    margin-bottom: 0;
    font-weight: normal;
    color: var(--wp-ink-2);
}

.auth-field--checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--wp-primary);
}

.auth-error {
    display: block;
    font-size: 13px;
    color: #d9534f;
    margin-top: 5px;
}

.auth-alert {
    font-size: 14px;
    line-height: 1.6;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid #eccccb;
    border-radius: var(--wp-radius-control);
    background-color: #fdf4f4;
    color: #c9302c;
    word-break: keep-all;
}

.auth-alert p {
    margin: 0;
}

/* ── 버튼 ── */
.auth-submit {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    border: none;
    border-radius: var(--wp-radius-control);
    background-color: var(--wp-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s;
}

.auth-submit:hover {
    background-color: var(--wp-primary-strong);
}

.auth-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--wp-primary-line);
    border-radius: var(--wp-radius-control);
    background-color: #fff;
    color: var(--wp-primary-strong);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s;
}

.auth-btn-secondary:hover {
    background-color: var(--wp-primary-tint);
    color: var(--wp-primary-strong);
    text-decoration: none;
}

.auth-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #e4b9b8;
    border-radius: var(--wp-radius-control);
    background-color: #fff;
    color: #d9534f;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.auth-btn-danger:hover {
    background-color: #d9534f;
    border-color: #d9534f;
    color: #fff;
}

/* ── 링크·구분선 ── */
.auth-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--wp-muted);
}

.auth-links a {
    color: var(--wp-primary-strong);
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 18px;
    font-size: 13px;
    color: var(--wp-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--wp-line);
}

/* ── 소셜 로그인 버튼 ── */
.auth-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--wp-radius-control);
    transition: filter 0.15s;
}

.auth-social-btn:hover {
    filter: brightness(0.96);
    text-decoration: none;
}

.auth-social-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 카카오·네이버 바탕색은 각 사 로그인 버튼 지침의 브랜드 색이라 그대로 둔다. */
.auth-social-btn--google {
    background-color: #fff;
    border-color: var(--wp-input-line);
    color: var(--wp-ink);
}

.auth-social-btn--google:hover {
    color: var(--wp-ink);
}

.auth-social-btn--kakao {
    background-color: #fee500;
    color: #191919;
}

.auth-social-btn--kakao:hover {
    color: #191919;
}

.auth-social-btn--naver {
    background-color: #03c75a;
    color: #fff;
}

.auth-social-btn--naver:hover {
    color: #fff;
}

/* ── 상태 안내 페이지 (메일 발송 완료 등) ── */
.auth-status {
    text-align: center;
}

.auth-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background-color: var(--wp-primary-wash);
}

.auth-status-icon i {
    font-size: 28px;
    color: var(--wp-primary);
}

.auth-status-icon--warn {
    background-color: rgba(217, 83, 79, 0.1);
}

.auth-status-icon--warn i {
    color: #d9534f;
}

.auth-status p {
    font-size: 15px;
    color: var(--wp-ink-2);
    line-height: 1.7;
    margin: 0 0 4px;
    word-break: keep-all;
}

/* auth-submit(전체 폭 강조 버튼)을 <a> 링크로 쓸 때 텍스트를 가운데 정렬한다. */
.auth-submit-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.auth-submit-link:hover {
    text-decoration: none;
    color: #fff;
}

/* ── 마이페이지 ── */
.profile-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--wp-line);
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: var(--wp-primary);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    flex-shrink: 0;
}

.profile-id {
    min-width: 0;
}

.profile-email {
    font-size: 17px;
    font-weight: 700;
    color: var(--wp-ink);
    word-break: break-all;
}

.profile-joined {
    font-size: 13px;
    color: var(--wp-muted);
    margin-top: 4px;
}

.profile-menu {
    margin-top: 6px;
}

.profile-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 4px;
    border-bottom: 1px solid var(--wp-line-soft);
    font-size: 15px;
    font-weight: 600;
    color: var(--wp-ink);
    text-decoration: none;
    transition: background-color 0.15s;
}

.profile-menu a:hover {
    background-color: var(--wp-primary-tint);
    text-decoration: none;
    color: var(--wp-ink);
}

.profile-menu i:first-child {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--wp-primary);
}

.profile-menu .profile-menu-arrow {
    margin-left: auto;
    color: var(--wp-input-line);
    font-size: 13px;
}

.profile-menu a.profile-menu-danger,
.profile-menu a.profile-menu-danger i:first-child {
    color: #d9534f;
}

.profile-menu a.profile-menu-danger:hover {
    background-color: #fdf4f4;
}

/* ── 계정 관리 목록 (이메일 주소·소셜 연결) ── */
.manage-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--wp-ink);
    margin: 34px 0 14px;
}

.manage-list {
    border-top: 1px solid var(--wp-line);
}

.manage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--wp-line-soft);
    font-size: 15px;
    color: var(--wp-ink);
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

.manage-item input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--wp-primary);
    flex-shrink: 0;
}

.manage-item-label {
    word-break: break-all;
}

/* 배지는 app.css .wc-chip 과 같은 알약 모양. 수식어가 없으면(철회·기록 없음) 회색. */
.auth-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    vertical-align: 1px;
    background-color: var(--wp-line-soft);
    color: var(--wp-ink-2);
}

.auth-badge--ok {
    background-color: var(--wp-primary-wash);
    color: var(--wp-primary-strong);
}

.auth-badge--warn {
    background-color: #fef3c7;
    color: #92400e;
}

/* '기본' 이메일은 바로 옆 '인증됨' 배지와 구분되도록 채운 색으로 둔다. */
.auth-badge--primary {
    background-color: var(--wp-primary);
    color: #fff;
}

.manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.manage-empty {
    font-size: 14px;
    color: var(--wp-muted);
    padding: 14px 0;
    word-break: keep-all;
}

/* ── 회원가입 동의 항목 (templates/legal/_consent_fields.html) ── */
.consent-box {
    margin: 20px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--wp-line);
    border-radius: var(--wp-radius-control);
    background: var(--wp-page);
}

.consent-legend {
    float: left;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-ink);
    margin-bottom: 8px;
}

.consent-all {
    display: flex;
    align-items: center;
    gap: 8px;
    clear: both;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--wp-line);
    font-size: 15px;
    font-weight: 700;
    color: var(--wp-ink);
    cursor: pointer;
}

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

.consent-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 14px;
    color: var(--wp-ink-2);
}

.consent-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.consent-box input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--wp-primary);
}

.consent-tag {
    font-size: 11px;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--wp-line-soft);
    color: var(--wp-ink-2);
}

.consent-tag--required {
    background: var(--wp-primary-wash);
    color: var(--wp-primary-strong);
}

.consent-link {
    margin-left: auto;
    font-size: 13px;
    color: var(--wp-primary-strong);
    text-decoration: underline;
}

.consent-item--error {
    color: #d9534f;
}

.consent-item .auth-error {
    flex-basis: 100%;
    margin-top: 0;
}

/* ── 약관·동의 관리 (templates/legal/consents.html) ── */
.consent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 12px 0 20px;
}

.consent-table th,
.consent-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--wp-line);
    text-align: left;
    vertical-align: middle;
}

.consent-table th {
    font-size: 13px;
    color: var(--wp-muted);
    font-weight: 600;
}

.consent-table .consent-link {
    margin-left: 6px;
}

.consent-marketing {
    margin-bottom: 8px;
}
