/**
 * 인증 관련 스타일
 * 로그인, SMS 인증, 비밀번호 변경 화면
 */

/* 인증 카드 */
.auth-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* 인증 폼 그룹 */
.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-form-group:last-of-type {
    margin-bottom: 1.5rem;
}

/* 인증 버튼 */
.auth-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background-color: #334155;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.auth-btn:hover:not(:disabled) {
    background-color: #1e293b;
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* SMS 인증 영역 */
.sms-verify-container {
    display: flex;
    gap: 0.5rem;
}

.sms-verify-input {
    flex: 1;
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0.5rem;
    font-weight: 600;
}

.sms-resend-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #64748b;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    cursor: pointer;
    white-space: nowrap;
}

.sms-resend-btn:hover:not(:disabled) {
    background-color: #f1f5f9;
}

.sms-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 타이머 */
.sms-timer {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.75rem;
}

.sms-timer.warning {
    color: #b45309;
}

.sms-timer.expired {
    color: #be123c;
}

/* 비밀번호 강도 표시 */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    transition: width 0.2s ease-in-out;
}

.password-strength-fill.weak {
    width: 25%;
    background-color: #ef4444;
}

.password-strength-fill.fair {
    width: 50%;
    background-color: #f59e0b;
}

.password-strength-fill.good {
    width: 75%;
    background-color: #22c55e;
}

.password-strength-fill.strong {
    width: 100%;
    background-color: #059669;
}

.password-strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* 보안서약 영역 */
.agreement-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.agreement-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.75rem;
}

.agreement-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #475569;
}

.agreement-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
}

.agreement-checkbox input[type="checkbox"] {
    margin-top: 0.125rem;
    width: 1rem;
    height: 1rem;
    accent-color: #334155;
}

.agreement-checkbox label {
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
}

/* 에러 상태 */
.auth-error {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #be123c;
    background-color: #ffe4e6;
    border-radius: 0.375rem;
}

/* 성공 상태 */
.auth-success {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #047857;
    background-color: #d1fae5;
    border-radius: 0.375rem;
}

/* 로그인 버튼 로딩 상태 */
.auth-btn .spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 입력 필드 에러 상태 */
.form-input.has-error {
    border-color: #fda4af;
}

.form-input.has-error:focus {
    border-color: #f43f5e;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

/* SMS 인증 화면 */
.sms-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.sms-description {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
}

.sms-description strong {
    color: #334155;
    font-weight: 600;
}

.sms-code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.75rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.sms-code-input::placeholder {
    font-size: 0.875rem;
    letter-spacing: normal;
    font-weight: 400;
}

.sms-timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.sms-timer-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.sms-timer {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    font-variant-numeric: tabular-nums;
}

.sms-timer.warning {
    color: #b45309;
}

.sms-timer.expired {
    color: #be123c;
}

.sms-resend-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.sms-resend-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    color: #475569;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.sms-resend-btn:hover:not(:disabled) {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.sms-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sms-resend-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.sms-cancel {
    margin-top: 1.25rem;
    text-align: center;
}

.sms-cancel-link {
    font-size: 0.8125rem;
    color: #94a3b8;
    text-decoration: none;
}

.sms-cancel-link:hover {
    color: #64748b;
    text-decoration: underline;
}

/* 비밀번호 변경 화면 */
.change-password-card {
    max-width: 100%;
}

.change-password-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.change-password-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}

.change-password-description {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}

.change-password-description strong {
    color: #334155;
    font-weight: 600;
}

.password-section {
    margin-bottom: 1.5rem;
}

.form-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.change-password-cancel {
    margin-top: 1.25rem;
    text-align: center;
}

.change-password-cancel-link {
    font-size: 0.8125rem;
    color: #94a3b8;
    text-decoration: none;
}

.change-password-cancel-link:hover {
    color: #64748b;
    text-decoration: underline;
}

/* 보안서약 내용 스크롤바 스타일 */
.agreement-content::-webkit-scrollbar {
    width: 6px;
}

.agreement-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.agreement-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.agreement-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 보안서약 내용 내부 스타일 */
.agreement-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}

.agreement-content h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.agreement-content p {
    margin-bottom: 0.75rem;
}

.agreement-content ol,
.agreement-content ul {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.agreement-content li {
    margin-bottom: 0.25rem;
}

/* 인증 만료 안내 */
.expired-notice {
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
}

.expired-notice-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #b91c1c;
    margin-bottom: 0.25rem;
}

.expired-notice-desc {
    font-size: 0.8125rem;
    color: #dc2626;
}

.hidden {
    display: none !important;
}

/* ========================================
   보안서약 전용 화면 (넓은 레이아웃)
   ======================================== */

.security-agreement-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.security-agreement-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.security-agreement-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}

.security-agreement-description {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.6;
}

.security-agreement-description strong {
    color: #334155;
    font-weight: 600;
}

/* 넓은 보안서약 컨테이너 */
.agreement-container-large {
    margin-bottom: 1.5rem;
}

.agreement-version {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.agreement-content-large {
    min-height: 300px;
    max-height: 450px;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #475569;
}

.agreement-content-large::-webkit-scrollbar {
    width: 8px;
}

.agreement-content-large::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.agreement-content-large::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.agreement-content-large::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 보안서약 내용 내부 스타일 (넓은 버전) */
.agreement-content-large h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.agreement-content-large h3:first-child {
    margin-top: 0;
}

.agreement-content-large h4 {
    font-size: 1rem;
    font-weight: 500;
    color: #475569;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.agreement-content-large p {
    margin-bottom: 1rem;
}

.agreement-content-large ol,
.agreement-content-large ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.agreement-content-large li {
    margin-bottom: 0.5rem;
}

/* 넓은 체크박스 영역 */
.agreement-checkbox-large {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.agreement-checkbox-large input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #334155;
    cursor: pointer;
}

.agreement-checkbox-large label {
    font-size: 0.9375rem;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
}

/* 넓은 버튼 */
.auth-btn-large {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background-color: #334155;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.auth-btn-large:hover:not(:disabled) {
    background-color: #1e293b;
}

.auth-btn-large:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 취소 링크 */
.security-agreement-cancel {
    margin-top: 1.25rem;
    text-align: center;
}

.security-agreement-cancel-link {
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: none;
}

.security-agreement-cancel-link:hover {
    color: #64748b;
    text-decoration: underline;
}
