/* ─── FINGERPUSH.LINK 서비스 매뉴얼 스타일 ─── */

/* ─── Font Face - NanumSquareNeo ─── */
@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 300;
    font-style: normal;
    src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-aLt.woff2') format('woff2'),
         url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-aLt.woff') format('woff');
}
@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 400;
    font-style: normal;
    src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.woff2') format('woff2'),
         url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.woff') format('woff');
}
@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 700;
    font-style: normal;
    src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.woff2') format('woff2'),
         url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.woff') format('woff');
}
@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 800;
    font-style: normal;
    src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.woff2') format('woff2'),
         url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.woff') format('woff');
}
@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 900;
    font-style: normal;
    src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-eHv.woff2') format('woff2'),
         url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-eHv.woff') format('woff');
}

:root {
    --docs-sidebar-width: 280px;
    --docs-primary: #2563eb;
    --docs-primary-light: #eff6ff;
    --docs-border: #e5e7eb;
    --docs-text: #1f2937;
    --docs-text-light: #6b7280;
    --docs-bg: #ffffff;
    --docs-bg-gray: #f9fafb;
    --docs-code-bg: #f3f4f6;
}

/* ─── 레이아웃 ─── */
.docs-container {
    display: flex;
    min-height: 100vh;
}

.docs-sidebar {
    width: var(--docs-sidebar-width);
    background: var(--docs-bg);
    border-right: 1px solid var(--docs-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 40;
    transition: transform 0.3s ease;
}

.docs-main {
    margin-left: var(--docs-sidebar-width);
    flex: 1;
    background: var(--docs-bg);
    min-height: 100vh;
}

.docs-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 3rem 4rem;
}

/* ─── 사이드바 ─── */
.docs-sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--docs-border);
}

.docs-sidebar-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--docs-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.docs-sidebar-logo:hover {
    opacity: 0.85;
}

.docs-sidebar-badge {
    font-size: 0.65rem;
    background: var(--docs-primary);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.docs-nav {
    padding: 1rem 0;
}

.docs-nav-section {
    padding: 0.5rem 1.5rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--docs-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-nav-link {
    display: block;
    padding: 0.45rem 1.5rem 0.45rem 2rem;
    font-size: 0.875rem;
    color: var(--docs-text-light);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.docs-nav-link:hover {
    color: var(--docs-text);
    background: var(--docs-bg-gray);
}

.docs-nav-link.active {
    color: var(--docs-primary);
    background: var(--docs-primary-light);
    border-left-color: var(--docs-primary);
    font-weight: 600;
}

.docs-nav-divider {
    height: 1px;
    background: var(--docs-border);
    margin: 0.75rem 1.5rem;
}

/* ─── 콘텐츠 타이포그래피 ─── */
.docs-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--docs-text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.docs-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--docs-text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--docs-border);
}

.docs-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--docs-text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.docs-content p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #374151;
    margin-bottom: 1rem;
}

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

.docs-content li {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #374151;
    margin-bottom: 0.35rem;
}

.docs-subtitle {
    font-size: 1.1rem;
    color: var(--docs-text-light);
    margin-bottom: 2rem;
}

/* ─── 스크린샷 플레이스홀더 ─── */
.docs-screenshot {
    margin: 1.5rem 0;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: var(--docs-bg-gray);
}

.docs-screenshot.has-image {
    border-style: solid;
    border-color: var(--docs-border);
}

.docs-screenshot img {
    width: 100%;
    display: block;
}

.docs-screenshot-placeholder {
    padding: 2rem;
    text-align: center;
}

.docs-screenshot-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.docs-screenshot-desc {
    font-size: 0.85rem;
    color: var(--docs-text-light);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.docs-screenshot-path {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: monospace;
    background: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    display: inline-block;
}

.docs-screenshot-caption {
    font-size: 0.8rem;
    color: var(--docs-text-light);
    text-align: center;
    padding: 0.5rem 1rem;
    background: var(--docs-bg-gray);
    border-top: 1px solid var(--docs-border);
}

/* ─── 스크린샷 그리드 (가로 배치) ─── */
.docs-screenshot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.docs-screenshot-grid .docs-screenshot {
    margin: 0;
}

@media (max-width: 768px) {
    .docs-screenshot-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── 알림 박스 ─── */
.docs-callout {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1.25rem 0;
    font-size: 0.9rem;
    line-height: 1.65;
    border-left: 4px solid;
}

.docs-callout-title {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.docs-callout.info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.docs-callout.warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.docs-callout.tip {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

.docs-callout.danger {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* ─── 스텝 가이드 ─── */
.docs-steps {
    counter-reset: step-counter;
    margin: 1.5rem 0;
}

.docs-step {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    padding-bottom: 1.5rem;
    border-left: 2px solid var(--docs-border);
    margin-left: 0.875rem;
}

.docs-step:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.docs-step::before {
    content: counter(step-counter);
    position: absolute;
    left: -0.9375rem;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--docs-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.docs-step-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--docs-text);
}

.docs-step-desc {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.65;
}

/* ─── 코드 블록 ─── */
.docs-code {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 10px;
    margin: 1.25rem 0;
    overflow: hidden;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.docs-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #0f172a;
    font-size: 0.75rem;
    color: #94a3b8;
    border-bottom: 1px solid #334155;
}

.docs-code-header span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.docs-code-header span::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
}

.docs-code-copy {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.docs-code-copy:hover {
    background: #334155;
    color: #e2e8f0;
    border-color: #64748b;
}

.docs-code-copy:active {
    background: #475569;
}

.docs-code-body {
    padding: 1rem 0;
    overflow-x: auto;
    font-size: 0.82rem;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    line-height: 1.7;
    counter-reset: line;
}

.docs-code-body pre {
    margin: 0;
    padding: 0;
}

.docs-code-body code {
    color: #e2e8f0;
    display: block;
}

.docs-code-body code .line {
    display: block;
    padding: 0 1.25rem 0 0;
    min-height: 1.7em;
}

.docs-code-body code .line::before {
    counter-increment: line;
    content: counter(line);
    display: inline-block;
    width: 3rem;
    padding-right: 1rem;
    text-align: right;
    color: #475569;
    font-size: 0.75rem;
    user-select: none;
    -webkit-user-select: none;
    border-right: 1px solid #334155;
    margin-right: 1rem;
}

.docs-code-body code .line:hover {
    background: rgba(148, 163, 184, 0.06);
}

/* 줄번호 없는 코드 블록 (짧은 출력 등) */
.docs-code.no-line-numbers .docs-code-body {
    counter-reset: none;
}

.docs-code.no-line-numbers code .line::before {
    display: none;
}

.docs-code.no-line-numbers code .line {
    padding-left: 1.25rem;
}

/* 구문 하이라이팅 */
.docs-code .syntax-keyword { color: #c084fc; }
.docs-code .syntax-string { color: #86efac; }
.docs-code .syntax-comment { color: #64748b; font-style: italic; }
.docs-code .syntax-number { color: #fbbf24; }
.docs-code .syntax-function { color: #7dd3fc; }
.docs-code .syntax-tag { color: #f87171; }
.docs-code .syntax-attr { color: #fbbf24; }
.docs-code .syntax-value { color: #86efac; }

.docs-inline-code {
    background: var(--docs-code-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: #be185d;
}

/* ─── 테이블 ─── */
.docs-table-wrap {
    overflow-x: auto;
    margin: 1.25rem 0;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.docs-table th {
    background: var(--docs-bg-gray);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--docs-border);
    color: var(--docs-text);
}

.docs-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--docs-border);
    color: #374151;
}

.docs-table tr:hover td {
    background: var(--docs-bg-gray);
}

/* ─── 이전/다음 내비게이션 ─── */
.docs-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--docs-border);
    gap: 1rem;
}

.docs-pagination a {
    display: block;
    padding: 1rem 1.25rem;
    border: 1px solid var(--docs-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--docs-text);
    transition: all 0.15s ease;
    flex: 1;
    max-width: 48%;
}

.docs-pagination a:hover {
    border-color: var(--docs-primary);
    background: var(--docs-primary-light);
}

.docs-pagination .prev {
    text-align: left;
}

.docs-pagination .next {
    text-align: right;
    margin-left: auto;
}

.docs-pagination-label {
    font-size: 0.75rem;
    color: var(--docs-text-light);
    margin-bottom: 0.25rem;
}

.docs-pagination-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--docs-primary);
}

/* ─── HTTP 메서드 뱃지 ─── */
.docs-method {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.02em;
}

.docs-method.get { background: #dbeafe; color: #1d4ed8; }
.docs-method.post { background: #dcfce7; color: #166534; }
.docs-method.put { background: #fef9c3; color: #854d0e; }
.docs-method.patch { background: #fef3c7; color: #92400e; }
.docs-method.delete { background: #fee2e2; color: #991b1b; }

/* ─── 모바일 대응 ─── */
.docs-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--docs-bg);
    border-bottom: 1px solid var(--docs-border);
    z-index: 50;
    align-items: center;
    padding: 0 1rem;
}

.docs-mobile-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--docs-text);
    font-size: 1.25rem;
}

.docs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 35;
}

@media (max-width: 768px) {
    .docs-mobile-header {
        display: flex;
    }
    
    .docs-sidebar {
        transform: translateX(-100%);
    }
    
    .docs-sidebar.open {
        transform: translateX(0);
    }
    
    .docs-overlay.open {
        display: block;
    }
    
    .docs-main {
        margin-left: 0;
        padding-top: 56px;
    }
    
    .docs-content {
        padding: 1.5rem 1.25rem 3rem;
    }
    
    .docs-pagination {
        flex-direction: column;
    }
    
    .docs-pagination a {
        max-width: 100%;
    }
}

/* ─── 인덱스 페이지 카드 ─── */
.docs-index-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--docs-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--docs-text);
    transition: all 0.2s ease;
    background: white;
}

.docs-index-card:hover {
    border-color: var(--docs-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.docs-index-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.docs-index-card-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: var(--docs-text);
}

.docs-index-card-desc {
    font-size: 0.85rem;
    color: var(--docs-text-light);
    line-height: 1.5;
}

/* ─── 검색 ─── */
.docs-search {
    padding: 0.75rem 1.5rem;
}

.docs-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--docs-border);
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    background: var(--docs-bg-gray) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 0.65rem center;
    transition: border-color 0.15s;
}

.docs-search-input:focus {
    border-color: var(--docs-primary);
    background-color: white;
}

/* ─── 이미지 라이트박스 ─── */
.docs-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.docs-lightbox-overlay.open {
    display: flex;
}
.docs-lightbox-img {
    max-width: 95%;
    max-height: 92vh;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    object-fit: contain;
}
.docs-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.docs-lightbox-close:hover {
    opacity: 1;
}

/* ─── Code Tabs ─── */
.docs-code-tabs {
    margin: 1.5rem 0;
}
.docs-code-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
}
.docs-code-tab {
    padding: 0.6rem 1.2rem;
    border: none;
    background: none;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.docs-code-tab:hover {
    color: #334155;
}
.docs-code-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}
.docs-code-tab-content {
    display: none;
}
.docs-code-tab-content.active {
    display: block;
}
.docs-code-tab-content > .docs-code {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
