/**
 * auth-gate.css
 * 강의자료 페이지 로그인 게이트 — auth-gate.js와 함께 사용
 *
 * 동작:
 *   - 페이지 로드 시 즉시 본문 blur (auth-gate.js가 검사 끝낼 때까지)
 *   - 인증 OK → .fc-gate-allowed 추가 → blur 해제
 *   - 미인증 → .fc-gate-locked 유지 + 모달 오버레이 표시
 */

/* 1) 검사 중에는 본문을 강하게 blur — 비로그인 콘텐츠 노출 최소화 */
html.fc-gate-checking body,
html.fc-gate-locked body {
    overflow: hidden;
}

html.fc-gate-checking body > *:not(.fc-gate-overlay),
html.fc-gate-locked body > *:not(.fc-gate-overlay) {
    filter: blur(14px);
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: filter 0.25s ease;
}

html.fc-gate-allowed body > * {
    filter: none !important;
    pointer-events: auto;
    user-select: auto;
}

/* 2) 오버레이 */
.fc-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(1, 28, 64, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: fcGateFade 0.25s ease;
}

@keyframes fcGateFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fc-gate-card {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(1, 28, 64, 0.28);
    padding: 36px 32px 28px;
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    color: #011C40;
    text-align: center;
}

.fc-gate-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 14px;
}

.fc-gate-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 14px;
    color: #011C40;
}

.fc-gate-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #4a5568;
    margin: 0 0 22px;
    word-break: keep-all;
}

.fc-gate-desc strong {
    color: #1243A6;
    font-weight: 700;
}

.fc-gate-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    background: #1243A6;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.fc-gate-google:hover {
    background: #0d367f;
    color: #ffffff;
}

.fc-gate-google:active {
    transform: translateY(1px);
}

.fc-gate-google svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 4px;
    padding: 2px;
}

.fc-gate-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.fc-gate-divider::before,
.fc-gate-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.fc-gate-secondary {
    display: flex;
    gap: 10px;
}

.fc-gate-secondary a {
    flex: 1;
    padding: 12px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #1243A6;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.fc-gate-secondary a:hover {
    border-color: #1243A6;
    background: #f5f8fc;
    color: #1243A6;
}

.fc-gate-foot {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    line-height: 1.6;
    color: #64748b;
    word-break: keep-all;
}

.fc-gate-foot .fc-gate-foot-why {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 11.5px;
}

@media (max-width: 480px) {
    .fc-gate-card {
        padding: 28px 22px 22px;
        border-radius: 14px;
    }
    .fc-gate-title {
        font-size: 18px;
    }
    .fc-gate-secondary {
        flex-direction: column;
    }
}
