/* ────────────────────────────────────────────────
   Subscription Gate — 결제 전 로그인 게이트 모달
   ──────────────────────────────────────────────── */

.sub-gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: subGateFade 0.22s ease-out;
}

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

.sub-gate-card {
    width: 100%;
    max-width: 480px;
    background: var(--ap-card);
    border-radius: 22px 22px 0 0;
    padding: 0;
    position: relative;
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.18);
    animation: subGateSlide 0.28s cubic-bezier(0.22, 0.68, 0, 1);
}

@keyframes subGateSlide {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (min-width: 520px) {
    .sub-gate-overlay { align-items: center; }
    .sub-gate-card { border-radius: 22px; margin: 20px; }
}

.sub-gate-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--ap-text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sub-gate-close:hover { background: var(--ap-bg-secondary); }
.sub-gate-close .material-symbols-outlined { font-size: 24px; }

.sub-gate-body {
    padding: 28px 24px 24px;
    text-align: center;
}

.sub-gate-icon {
    font-size: 40px;
    margin-bottom: 10px;
    line-height: 1;
}

.sub-gate-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ap-text);
    margin: 0 0 8px;
    line-height: 1.4;
}

.sub-gate-sub {
    font-size: 14px;
    color: var(--ap-text-secondary);
    line-height: 1.6;
    margin: 0 0 20px;
}

.sub-gate-error {
    background: rgba(226, 78, 78, 0.10);
    color: #d14a4a;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    text-align: left;
}

.sub-gate-btn-apple {
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    transition: background 0.15s, transform 0.12s;
}
.sub-gate-btn-apple:hover { background: #1a1a1a; }
.sub-gate-btn-apple:active { transform: scale(0.98); background: #2a2a2a; }
[data-theme="dark"] .sub-gate-btn-apple { background: #fff; color: #000; border-color: #fff; }
[data-theme="dark"] .sub-gate-btn-apple:hover { background: #f0f0f0; }
[data-theme="dark"] .sub-gate-btn-apple:active { background: #e0e0e0; }
body.dark-mode .sub-gate-btn-apple { background: #fff; color: #000; border-color: #fff; }

.sub-gate-btn-google {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    transition: background 0.15s;
}
.sub-gate-btn-google:hover { background: #f5f6f8; }
.sub-gate-btn-google:active { background: #e8eaed; }

.sub-gate-btn-later {
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    color: var(--ap-text-muted);
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
}
.sub-gate-btn-later:hover { background: var(--ap-bg-secondary); color: var(--ap-text-secondary); }

.sub-gate-privacy {
    font-size: 11px;
    color: var(--ap-text-muted);
    line-height: 1.5;
    margin: 14px 0 0;
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
    .sub-gate-btn-google {
        background: #f1f3f5;
        color: #1f2327;
    }
}
body.dark-mode .sub-gate-btn-google {
    background: #f1f3f5;
    color: #1f2327;
    border-color: #c9cdd2;
}

/* Galaxy Fold 접힌 화면 */
@media (max-width: 370px) {
    .sub-gate-body { padding: 22px 18px 20px; }
    .sub-gate-title { font-size: 18px; }
    .sub-gate-sub { font-size: 13px; }
}
