/**
 * 🌍 ZIEGG Platform - Public Page Styles (v1.0)
 * 폰트: Pretendard (Inter 대체)
 * 적용 대상: login.php, register.php, find_account.php
 * layout_public.php 에서 ziegg-core.css 와 함께 로드됩니다.
 */

/* =========================================
   🔤 Font: Pretendard (CDN)
   ※ Inter CDN은 layout_public.php에서 제거, 여기서 통합 관리
========================================= */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* =========================================
   🌐 Public Page: Base Layout
   모든 공개 페이지의 공통 body/root 레이아웃
========================================= */
body.public-page {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #F8FAFC;
    color: #1E293B;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    /* align-items: center; -> 플렉스 박스 상단 짤림(Cutoff) 버그를 방지하기 위해 제거 */
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* =========================================
   🃏 Public Card (공통 카드 컨테이너)
   login, find_account 등 단일 카드 형 페이지에 사용
========================================= */
.public-card {
    background: #fff;
    width: 420px;
    max-width: 100%;
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    text-align: center;
    margin: auto; /* 상단 짤림 방지용 중앙 정렬 */
}

.public-card-wide {
    background: #fff;
    width: 560px;
    max-width: 100%;
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    text-align: center;
}

/* =========================================
   🔷 Public Logo
========================================= */
.public-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 32px;
    font-weight: 800;
    color: var(--z-primary);
    letter-spacing: -1px;
    margin-bottom: 40px;
}

/* =========================================
   📝 Public Form Controls
========================================= */
.p-form-group {
    text-align: left;
    margin-bottom: 12px;
}

.p-form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.p-form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    background: #fff;
    color: #1E293B;
}

.p-form-control:focus {
    border-color: var(--z-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.p-form-control::placeholder {
    color: #94a3b8;
}

.p-form-control:disabled,
.p-form-control[readonly] {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* =========================================
   🔘 Public Buttons
========================================= */
.btn-public-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    background: var(--z-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
    letter-spacing: 0;
    font-family: inherit;
}

.btn-public-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    background: var(--z-primary-dark);
}

.btn-public-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-public-secondary {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-public-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* =========================================
   🔗 Public Options Row (remember me / 찾기 등)
========================================= */
.public-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
    gap: 10px;
}

.option-item {
    background: #F1F5F9;
    padding: 10px 8px;
    border-radius: 8px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #64748B;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover { background: #E2E8F0; }
.option-item a { color: inherit; text-decoration: none; }
.option-item label { display: flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }

/* =========================================
   📎 Public Footer Link
========================================= */
.public-footer {
    margin-top: 32px;
    font-size: 14px;
    color: #64748B;
}

.public-footer a {
    color: var(--z-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 8px;
}

/* =========================================
   ✅ Inline Validation Messages
========================================= */
.p-msg {
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    display: none;
}

.p-msg-ok { color: #10B981; display: block; }
.p-msg-err { color: #EF4444; display: block; }

/* =========================================
   🔢 인증번호 입력 박스 (find_account 전용)
========================================= */
.otp-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.otp-input {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.otp-input:focus {
    border-color: var(--z-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
/* =========================================
   📝 Register Page Specific Styles
========================================= */
.register-container {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
    margin: auto;
    width: 100%;
    box-sizing: border-box;
}

.card-register {
    background: #fff;
    width: 1000px;
    max-width: 100%;
    margin: auto;
    padding: 48px;
        border-radius: 24px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
        border: 1px solid #f1f5f9;
    }

    .login-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        font-size: 32px;
        font-weight: 800;
        color: var(--z-primary);
        letter-spacing: -1px;
        margin-bottom: 12px;
        cursor: pointer;
    }

    /* Steps */
    .step-indicator {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
        padding: 0 20px;
    }

    .step-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        color: #cbd5e1;
        transition: 0.3s;
    }

    .step-item.active {
        color: var(--z-primary);
    }

    .step-item.passed {
        color: #10B981;
    }

    .step-num {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #f1f5f9;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: 800;
        font-size: 14px;
        transition: 0.3s;
    }

    .step-item.active .step-num {
        background: var(--z-primary);
        color: #fff;
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    }

    .step-item.passed .step-num {
        background: #10B981;
        color: #fff;
    }

    .step-item span {
        font-size: 13px;
        font-weight: 700;
    }

    .step-line {
        flex: 1;
        height: 2px;
        background: #e2e8f0;
        margin: 0 16px;
        position: relative;
        top: -12px;
        transition: 0.3s;
    }

    .step-line.active {
        background: #10B981;
    }

    /* Forms */
    .step-view {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .step-view.active {
        display: block;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .form-group {
        margin-bottom: 24px;
    }

    .form-group label {
        display: block;
        font-weight: 700;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .form-control {
        width: 100%;
        padding: 14px;
        border: 1.5px solid var(--z-border);
        border-radius: 12px;
        outline: none;
        transition: 0.2s;
        box-sizing: border-box;
        font-family: inherit;
    }

    .form-control:focus {
        border-color: var(--z-primary);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    }

    .row-group {
        display: flex;
        gap: 16px;
    }

    .row-group .form-group {
        flex: 1;
    }

    .section-title {
        font-size: 18px;
        font-weight: 800;
        color: #0f172a;
        border-bottom: 2px solid #0f172a;
        padding-bottom: 12px;
        margin: 32px 0 24px 0;
    }

    .validation-msg {
        font-size: 12px;
        margin-top: 6px;
        display: block;
    }

    .valid {
        color: #10B981;
    }

    .invalid {
        color: var(--z-danger);
    }

    .terms-box {
        border: 1px solid var(--z-border);
        background: #f8fafc;
        padding: 16px;
        height: 120px;
        overflow-y: auto;
        border-radius: 12px;
        font-size: 12px;
        color: #64748b;
        margin-bottom: 12px;
        line-height: 1.6;
    }

    .btn-group {
        display: flex;
        gap: 16px;
        margin-top: 40px;
    }

    .btn-outline {
        flex: 1;
        padding: 16px;
        border: 2px solid var(--z-border);
        background: #fff;
        border-radius: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: 0.2s;
        font-family: inherit;
    }

    .btn-outline:hover {
        background: #f1f5f9;
    }

    .btn-primary {
        flex: 1;
        padding: 16px;
        background: var(--z-primary);
        color: #fff;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: 0.2s;
        font-family: inherit;
    }

    .btn-primary:not(:disabled):hover {
        background: var(--z-primary-dark);
        transform: translateY(-1px);
    }

    .btn-primary:disabled {
        background: #94a3b8;
        cursor: not-allowed;
    }

    /* File Upload */
    .file-row {
        display: flex;
        align-items: stretch;
        gap: 12px;
    }

    .btn-file {
        padding: 0 20px;
        box-sizing: border-box;
        height: 48px;
        line-height: 48px;
        background: #f1f5f9;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        font-weight: 700;
        font-size: 13px;
        cursor: pointer;
        transition: 0.2s;
        white-space: nowrap;
    }

    .btn-file:hover {
        background: #e2e8f0;
    }

    .file-name-display {
        flex: 1;
        box-sizing: border-box;
        height: 48px;
        padding: 0 16px;
        border: 1.5px dashed var(--z-border);
        border-radius: 8px;
        font-size: 13px;
        color: #94a3b8;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .file-name-display.selected {
        border-style: solid;
        border-color: var(--z-primary);
        background: #EEF2FF;
        color: var(--z-primary);
        font-weight: 700;
    }

    .btn-file-reset {
        background: #fee2e2;
        color: #ef4444;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }

    /* Pricing */
    .pricing-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }

    .pricing-card {
        border: 2px solid var(--z-border);
        border-radius: 16px;
        padding: 24px;
        cursor: pointer;
        position: relative;
        transition: 0.2s;
        background: #fff;
    }

    .pricing-card:hover {
        border-color: #cbd5e1;
    }

    .pricing-card.selected {
        border-color: var(--z-primary);
        background: #EEF2FF;
        box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.1);
    }

    .pricing-card.selected::before {
        content: '✓';
        position: absolute;
        top: -10px;
        right: -10px;
        width: 28px;
        height: 28px;
        background: var(--z-primary);
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        border: 3px solid #fff;
    }

    .badge-trial {
        position: absolute;
        top: -12px;
        left: 24px;
        background: #10B981;
        color: #fff;
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 800;
    }

    .pricing-title {
        font-size: 18px;
        font-weight: 800;
        margin-bottom: 8px;
        color: #1e293b;
    }

    .pricing-price {
        font-size: 24px;
        font-weight: 800;
        color: var(--z-primary);
        margin-bottom: 16px;
    }

    .pricing-desc {
        font-size: 13px;
        color: #64748b;
    }

    .pricing-desc ul {
        padding-left: 20px;
        margin: 0;
        line-height: 1.6;
    }

/* =========================================
   🔍 Find Account Specific Styles
========================================= */

/* 탭 UI */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 30px; padding: 6px; background: #F1F5F9; border-radius: 14px; }
.tab-btn { flex: 1; padding: 10px; font-size: 14px; font-weight: 700; border: none; background: transparent; color: #64748b; cursor: pointer; border-radius: 10px; transition: 0.2s; }
.tab-btn.active { background: #fff; color: var(--z-primary); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }

/* 타이머 */
.timer { margin: 20px 0 32px 0; font-size: 15px; font-weight: 700; color: #EF4444; }

/* 아이콘 원 */
.icon-circle { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px auto; font-size: 24px; }
.success-bg { background: #ECFDF5; color: #10B981; }
.reset-bg { background: #EEF2FF; color: var(--z-primary); }

/* SPA 뷰 애니메이션 */
.spa-view { display: none; animation: fadeIn 0.3s ease; }
.spa-view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* 되돌아가기 링크 */
.back-link { margin-top: 24px; display: block; font-size: 13px; color: #64748b; text-decoration: underline; cursor: pointer; }

/* 결과 ID 표시 박스 */
.result-id-box { background: #F8FAFC; border: 1.5px dashed #E2E8F0; padding: 32px 24px; border-radius: 12px; margin-bottom: 40px; }
.result-id-text { font-size: 24px; font-weight: 800; color: var(--z-primary); }

/* 제목 영역 */
.title-area { margin-bottom: 24px; }
.main-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.sub-title { font-size: 14px; color: #64748b; line-height: 1.5; }

/* =========================================
   🛒 Premium Checkout UI (register.php)
========================================= */
.checkout-wrapper { display:grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top:24px; }
.checkout-left-box { background: #fff; border-radius: 12px; padding: 24px; border: 1px solid var(--z-border, #e2e8f0); margin-bottom: 24px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.checkout-title { margin-bottom: 16px; font-weight: 800; color:#1e293b; font-size:15px; display:flex; align-items:center; gap:8px; }
.coupon-msg { margin-top:10px; font-size:13px; font-weight:600; }
.pay-method-grid { display:grid; grid-template-columns: 1fr 1fr; gap:16px; margin-top:8px; }
.pay-method-card { border:1px solid var(--z-border, #e2e8f0); padding:20px 16px; border-radius:12px; cursor:pointer; text-align:center; font-weight:700; color:#1e293b; transition:all 0.2s; display:flex; flex-direction:column; align-items:center; gap:12px; background:#fff; }
.pay-method-card:hover { border-color:var(--z-primary, #4f46e5); box-shadow:0 4px 12px rgba(0,0,0,0.05); transform:translateY(-2px); }
.pay-method-card.active { border:2px solid var(--z-primary, #4f46e5); background:#eff6ff; color:var(--z-primary, #4f46e5); box-shadow:0 4px 12px rgba(59,130,246,0.15); }
.pay-method-card.active svg { stroke:var(--z-primary, #4f46e5); }
.pay-method-card.disabled { border:1px solid #e2e8f0; background:#f8fafc; color:#94a3b8; cursor:not-allowed; }
.pay-method-card.disabled:hover { transform:none; border-color:#e2e8f0; box-shadow:none; }
.pay-method-card svg { stroke:#64748b; transition:stroke 0.2s; }
.pay-method-card.disabled svg { stroke:#cbd5e1; }
.free-trial-info { background: #eff6ff; border-radius: 12px; padding: 24px; border: 1px solid #bfdbfe; }
.free-trial-title { margin-bottom: 8px; font-weight: 800; color:#1e3a8a; font-size:16px; }
.free-trial-desc { color:#3b82f6; margin:0; line-height:1.5; }
.receipt-box { background:#f8fafc; color:#1e293b; border-radius:12px; padding:24px; position:sticky; top:24px; border:1px solid #e2e8f0; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); }
.receipt-title { color:#475569; margin-bottom:24px; font-weight:800; font-size:15px; border-bottom:1px dashed #cbd5e1; padding-bottom:16px; }
.receipt-row { display:flex; justify-content:space-between; margin-bottom:16px; font-size:15px; }
.receipt-label { color:#64748b; font-weight:600; }
.receipt-val { color:#0f172a; font-weight:700; }
.receipt-val.discount { color:#ef4444; }
.receipt-divider { border:none; border-top:1px solid #e2e8f0; margin:24px 0; }
.receipt-total-row { display:flex; justify-content:space-between; align-items:flex-end; }
.receipt-total-label { color:#475569; font-size:16px; font-weight:700; }
.receipt-total-val { font-size:28px; font-weight:800; color:#10b981; }
