﻿/*
 * 약관 화면(약관 상세 /?app=10_1, 10_2, 약관 전체 보기 /?app=10_5, 회원가입의 약관 칸) 전용 스타일.
 * 마크업은 App_Code/terms/TermsContent.cs 가 만든다. 사이트의 초록 포인트와 회색 선을 그대로 쓴다.
 */
.terms-doc { --t-accent: #4f9a1e; --t-old: #d49a2a; --t-line: #e2e2e2; --t-soft: #f7f7f5; --t-ink: #333; --t-muted: #777; margin-bottom: 40px; }

/* 문서 정보 줄: 본문 위, 지금 보는 약관이 무엇인지 */
.terms-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; padding: 18px 22px; background: var(--t-soft); border: 1px solid var(--t-line); border-top: 3px solid var(--t-accent); }
.terms-doc.is-old .terms-meta { border-top-color: var(--t-old); }
.terms-dates { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; flex: 1 1 auto; }
.terms-dates > div { min-width: 0; }
.terms-dates dt { font-size: 12px; font-weight: 400; color: var(--t-muted); margin: 0 0 2px; }
.terms-dates dd { margin: 0; font-size: 15px; color: var(--t-ink); font-variant-numeric: tabular-nums; }
.terms-dates .is-no dd { font-size: 22px; font-weight: 700; line-height: 1.1; }
.terms-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; color: #fff; background: var(--t-accent); border-radius: 2px; vertical-align: 3px; }
.terms-doc.is-old .terms-badge { background: var(--t-old); }

/* 이전 버전 보기: 펼치면 버전 흐름이 세로로 */
.terms-history { border: 1px solid var(--t-line); border-top: 0; background: #fff; }
.terms-history > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 22px; font-size: 14px; color: var(--t-ink); }
.terms-history > summary::-webkit-details-marker { display: none; }
.terms-history > summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid var(--t-muted); border-bottom: 2px solid var(--t-muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.terms-history[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.terms-history > summary:hover { background: var(--t-soft); }
.terms-history > summary:focus-visible { outline: 2px solid var(--t-accent); outline-offset: -2px; }
.terms-history > summary .count { color: var(--t-muted); }
.terms-versions { list-style: none; margin: 0; padding: 4px 22px 18px 22px; }
.terms-versions li { position: relative; padding: 0 0 0 26px; }
.terms-versions li::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--t-line); }
.terms-versions li:first-child::before { top: 17px; }
.terms-versions li:last-child::before { bottom: auto; height: 17px; }
.terms-versions li:only-child::before { display: none; }
.terms-versions li::after { content: ""; position: absolute; left: 0; top: 11px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #aaa; background: #fff; }
.terms-versions li.is-now::after { background: var(--t-accent); border-color: var(--t-accent); box-shadow: 0 0 0 4px rgba(114, 192, 44, .2); }
.terms-versions li.is-view::after { border-color: var(--t-old); background: var(--t-old); }
.terms-versions a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 9px 10px; margin-left: -10px; color: var(--t-ink); text-decoration: none; border-radius: 2px; }
.terms-versions a:hover { background: var(--t-soft); }
.terms-versions a:focus-visible { outline: 2px solid var(--t-accent); }
.terms-versions .v { font-weight: 700; font-size: 15px; min-width: 38px; font-variant-numeric: tabular-nums; }
.terms-versions .d { font-size: 13px; color: var(--t-muted); font-variant-numeric: tabular-nums; }
.terms-versions .tag { font-size: 12px; font-weight: 700; color: var(--t-accent); }
.terms-versions li.is-view .tag { color: #b27a10; }

/* 예전 버전을 보고 있을 때 */
.terms-old-note { margin: 18px 0 0; padding: 12px 16px; background: #fbf5e8; border-left: 3px solid var(--t-old); font-size: 14px; color: #5b4a1f; }
.terms-old-note a { font-weight: 700; color: #8a5d00; text-decoration: underline; }

/* 본문, 맨 아래 */
.terms-body { padding: 26px 4px 6px; }
.terms-foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--t-line); font-size: 14px; }
.terms-foot a { color: var(--t-ink); text-decoration: none; border-bottom: 1px solid #bbb; }
.terms-foot a:hover { color: var(--t-accent); border-bottom-color: var(--t-accent); }

/* 약관 전체 보기: 약관마다 한 줄, 제목과 문서번호/공고일자/시행일자 */
.terms-list { list-style: none; margin: 0 0 44px; padding: 0; border-top: 1px solid var(--t-line); }
.terms-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 20px 18px 20px 20px; border-bottom: 1px solid var(--t-line); border-left: 3px solid transparent; color: var(--t-ink); text-decoration: none; }
.terms-list a:hover { background: var(--t-soft); border-left-color: var(--t-accent); }
.terms-list a:focus-visible { outline: 2px solid var(--t-accent); outline-offset: -2px; }
.terms-list .name { flex: 1 1 220px; font-size: 17px; font-weight: 700; }
.terms-list .facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; }
.terms-list .facts > div { min-width: 90px; }
.terms-list .facts > div:first-child { min-width: 64px; }
.terms-list .facts dt { font-size: 12px; font-weight: 400; color: var(--t-muted); margin: 0; }
.terms-list .facts dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.terms-list .more { flex: 0 0 124px; text-align: right; font-size: 13px; color: var(--t-muted); white-space: nowrap; }
.terms-list .more::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 2px 1px 8px; border-top: 2px solid #aaa; border-right: 2px solid #aaa; transform: rotate(45deg); }
.terms-list-note { font-size: 13px; color: var(--t-muted); }

/* 회원가입의 약관 칸 위에 붙는 한 줄 */
.terms-compact { margin: 0 0 10px; font-size: 13px; color: var(--t-muted); }

@media (max-width: 575.98px) {
    .terms-meta { padding: 16px; }
    .terms-history > summary, .terms-versions { padding-left: 16px; padding-right: 16px; }
    .terms-list a { padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) { .terms-history > summary::after { transition: none; } }
@media print { .terms-history, .terms-old-note { display: none; } .terms-meta { border-top-width: 1px; } }
