/**
 * Mocam Auth - 기본 스타일 (최소한의 레이아웃만 정의)
 * 테마에서 mocam-auth.css를 wp_enqueue_style로 추가하거나
 * 각 테마의 CSS로 .mocam-* 클래스를 오버라이드한다.
 */

.mocam-auth-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px;
}

.mocam-form .mocam-field {
    margin-bottom: 20px;
}

.mocam-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.mocam-form input[type="email"],
.mocam-form input[type="text"],
.mocam-form input[type="password"],
.mocam-form input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.mocam-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* 이메일 오류 강조 — .mocam-form 없이도 동작하도록 범용 선택자 사용 */
input.mocam-field-error {
    border-color: #fca5a5 !important;
    background: #fff8f8 !important;
    outline: none;
}
input.mocam-field-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
}

/* 스피너 */
.mocam-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mocam-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}
@keyframes mocam-spin {
    to { transform: rotate(360deg); }
}

.mocam-field-row {
    display: flex;
    gap: 8px;
}

.mocam-field-row input { flex: 1; }

/* 버튼 */
.mocam-btn-primary {
    width: 100%;
    padding: 12px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.mocam-btn-primary:hover { background: #4f46e5; }
.mocam-btn-primary:disabled { background: #a5b4fc; cursor: not-allowed; }
.mocam-btn-primary.mocam-loading::after {
    content: ' …';
}

.mocam-btn-outline {
    padding: 10px 16px;
    background: transparent;
    border: 1px solid #6366f1;
    color: #6366f1;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}
.mocam-btn-outline:hover { background: #f0f0ff; }

/* 메시지 */
.mocam-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.mocam-notice.mocam-success { background: #d1fae5; color: #065f46; }
.mocam-notice.mocam-error   { background: #fee2e2; color: #991b1b; }
.mocam-notice.mocam-info    { background: #eff6ff; color: #1e40af; }
.mocam-notice.mocam-warn    { background: #fef3c7; color: #92400e; }

.mocam-error-msg   { color: #dc2626; font-size: 13px; margin-top: 6px; }
.mocam-success-msg { color: #059669; font-size: 14px; margin-top: 8px; }
.mocam-field-msg   { font-size: 13px; margin-top: 4px; }

/* 비밀번호 강도 */
.mocam-pw-strength { font-size: 13px; margin-top: 4px; }
.mocam-pw-score-1 { color: #dc2626; }
.mocam-pw-score-2 { color: #f97316; }
.mocam-pw-score-3 { color: #eab308; }
.mocam-pw-score-4 { color: #22c55e; }
.mocam-pw-score-5 { color: #15803d; }

/* 폼 하단 링크 */
.mocam-form-footer { margin-top: 16px; font-size: 14px; text-align: center; color: #6b7280; }
.mocam-form-footer a { color: #6366f1; text-decoration: none; }
.mocam-form-footer a:hover { text-decoration: underline; }

/* 마이페이지 */
.mocam-profile-table { width: 100%; border-collapse: collapse; }
.mocam-profile-table th,
.mocam-profile-table td { padding: 10px 8px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.mocam-profile-table th { width: 120px; color: #6b7280; font-weight: 600; }

.mocam-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
}
.mocam-badge-ok   { background: #d1fae5; color: #065f46; }
.mocam-badge-warn { background: #fef3c7; color: #92400e; }

.mocam-account-actions { margin-top: 24px; }

/* ------------------------------------------------------------------ */
/* 소셜 로그인 버튼                                                     */
/* ------------------------------------------------------------------ */

.mocam-social-buttons {
    margin-top: 16px;
}

.mocam-social-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 16px;
    color: #9ca3af;
    font-size: 13px;
}
.mocam-social-divider::before,
.mocam-social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.mocam-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: var(--social-color, #f3f4f6);
    color: #fff;
    transition: opacity 0.2s;
    margin-bottom: 10px;
}
.mocam-social-btn:hover { opacity: 0.88; }
.mocam-social-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.mocam-social-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

/* ------------------------------------------------------------------ */
/* 소셜 가입 추가정보 모달                                              */
/* ------------------------------------------------------------------ */

.mocam-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.mocam-modal-box {
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.mocam-modal-box h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.mocam-modal-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* 소셜 버튼 상단 영역 */
.mocam-social-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* 소셜 / 이메일 구분선 */
.mocam-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: #9ca3af;
    font-size: 13px;
}
.mocam-divider::before,
.mocam-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* 이메일로 가입하기 토글 버튼 */
.mocam-btn-email-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 999px;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.mocam-btn-email-toggle:hover,
.mocam-btn-email-toggle--active {
    border-color: var(--mocam-primary, #e71f19);
    color: var(--mocam-primary, #e71f19);
}
