/*
 * sellmate.io 약관 화면(WWW-4). views: pages/terms.
 * 수치는 2026-11-11 원본 /agreement 를 1920px·375px 에서 잰 값이다(ImWeb 글 위젯 기본: 20px · 줄 간격 1.4, 글자색 #252525).
 * 본문 글자 크기는 원본 편집기가 넣은 인라인 style(대부분 16px)이 정한다.
 */
.sm-terms {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "head versions"
        "line line"
        "body body";
    column-gap: 20px;
    box-sizing: content-box;
    max-width: 1120px;
    margin: 0 auto;
    padding: 70px 20px 100px;
    color: #252525;
}
.sm-terms__head { grid-area: head; min-width: 0; }
.sm-terms__title { margin: 0; color: rgb(0, 41, 95); font-size: 34.28px; font-weight: 700; line-height: 1.2; }
/* WWW-12 윙크스톤 약관: 제목 색이 본문색이고(원본 h5 에 파란 색 지정이 없다), 두 줄(h5 두 개) 사이 간격 10px, 줄마다 글자 크기가 다르다.
   원본 모바일은 크기를 줄인다(20→15px · 36→24px · 기본 34.28→18px, 줄 높이 1.5) */
.sm-terms__title--plain { color: #252525; }
.sm-terms__title-line { display: block; }
.sm-terms__title-line + .sm-terms__title-line { margin-top: 10px; }
/* 글자 크기가 다른 줄은 안쪽 글에만 크기를 주어 줄 상자는 h5 기본 줄 높이(34.28px × 1.2)를 지키고, 글 자체 줄 높이는 1.2 다(원본 span) */
.sm-terms__title-size { line-height: 1.2; }
.sm-terms__title-size--20 { font-size: 20px; }
.sm-terms__title-size--36 { font-size: 36px; }
.sm-terms__update { margin: 15px 0 0; color: rgb(100, 100, 100); font-size: 16px; line-height: 2; }
.sm-terms__line { grid-area: line; width: 100%; height: 0; margin: 43px 0 20px; border: 0; border-top: 1px solid #e5e5e5; }

/* 버전 목록. 원본 PC 단추(이미지 맵 153×48) 자리 */
.sm-terms__versions { position: relative; grid-area: versions; align-self: start; margin-top: 15px; }
.sm-terms__versions-button {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 153px;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid #bbb;
    border-radius: 10px;
    background: #fff;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}
.sm-terms__versions-button::-webkit-details-marker { display: none; }
.sm-terms__versions-button:focus-visible { outline: 2px solid rgb(0, 41, 95); outline-offset: 2px; }
.sm-terms__versions-list {
    position: absolute;
    z-index: 10;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    margin: 0;
    padding: 6px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    list-style: none;
}
.sm-terms__versions-list a,
.sm-terms__versions-list span { display: block; padding: 8px 16px; color: #333; font-size: 14px; line-height: 1.5; white-space: nowrap; text-decoration: none; }
.sm-terms__versions-list a:hover { background: #f5f6f8; }
.sm-terms__versions-list .is-shown { color: rgb(0, 41, 95); font-weight: 700; }

/* 푸터는 사업자 정보만 있다(partials/footer 의 footer_legal_only). 원본은 본문 영역 끝에서 35px 아래에 첫 줄이 온다(PC·모바일 같음) */
.sm-footer--legal-only .sm-footer__legal { margin-top: 35px; }

/* 본문(원본 글 위젯 기본값) */
/* 원본 글 위젯 기본은 20px · 줄 간격 1.4 다. 대부분의 문단·목록은 편집기가 넣은 인라인 line-height: 2 로 40px 이 된다 */
.sm-terms__body { grid-area: body; min-width: 0; font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.sm-terms__body p { margin: 0; }
.sm-terms__body ol,
.sm-terms__body ul { margin: 0 0 10px; padding-left: 40px; }
/* 원본(부트스트랩 기본)처럼 목록 안 목록은 아래 여백이 없다 */
.sm-terms__body :is(ol, ul) :is(ol, ul) { margin-bottom: 0; }
.sm-terms__body table { max-width: 100%; border-collapse: collapse; }
.sm-terms__body td,
.sm-terms__body th { padding: 8px; border: 1px solid #ddd; }
/* 원본은 장 제목(24px)의 줄 간격이 1.2 다(실측 28.8px). 문단 줄 간격(2)을 물려받으면 장마다 8px 씩 길어진다 */
.sm-terms__body [style*="font-size:22px"],
.sm-terms__body [style*="font-size:24px"] { line-height: 1.2; }
.sm-terms__body a { color: #0b57d0; text-decoration: underline; }
.sm-terms__body h1, .sm-terms__body h2, .sm-terms__body h3,
.sm-terms__body h4, .sm-terms__body h5, .sm-terms__body h6 { margin: 0; line-height: 1.2; }
.sm-terms__body--mo { display: none; }

@media (max-width: 991px) {
    .sm-terms {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "head"
            "line"
            "body"
            "versions";
        padding: 40px 15px var(--sm-terms-pb, 90px);
    }
    .sm-terms__title { font-size: 18px; line-height: 1.5; }
    .sm-terms__title-size--20 { font-size: 15px; }
    .sm-terms__title-size--36 { font-size: 24px; }
    /* 원본은 글자만 14px 로 줄고 문단 줄 높이는 그대로 40px(20px × 2)이다 */
    .sm-terms__update { margin-top: 10px; font-size: 14px; line-height: 40px; }
    .sm-terms__line { margin: 33px 0 10px; }
    /* 원본 모바일은 단추가 본문 아래 가운데에 있다 */
    .sm-terms__versions { justify-self: center; margin-top: 10px; }
    /* 원본 모바일 단추: 126×39, 글자 12px, 테두리 #ccc, 모서리 6px */
    .sm-terms__versions-button { min-width: 126px; min-height: 39px; border-color: #ccc; border-radius: 6px; font-size: 12px; }
    .sm-terms__versions-list { right: auto; left: 50%; transform: translateX(-50%); }

    .sm-terms__body--pc { display: none; }
    /* 원본 모바일 전용 글 위젯은 구분선에서 10px 더 내려와 있다(/quick_induce 실측) */
    /* 모바일 전용 글 위젯은 좌우로도 5px 안쪽이다(원본 /winkstone_privacy_agreement 실측: 글 위젯 x 20·폭 335, 제목·본문(공유) 위젯은 x 15·폭 345).
       원본 /enterprise_privacy_agreement 의 모바일 위젯도 x 20·폭 335 로 같다. 지금 모바일 본문을 가진 약관은 윙크스톤 개인정보 제공 동의서 하나다
       (WWW-4 의 17행은 모두 body_html_mobile 이 NULL 이라 --mo 를 쓰지 않는다) */
    .sm-terms__body--mo { display: block; margin: 10px 5px 0; }
    /* 원본(ImWeb)은 PC 와 같이 쓰는 글 위젯의 인라인 글자 크기를 모바일에서 줄인다(14→13, 16→14, 24→16px 실측).
       15·22px 은 원본 화면에서 줄어드는 모습을 보지 못해 가까운 값(14·16px)으로 둔다.
       선택자는 TermsHtmlSanitizer 가 정리한 style 형식(공백 없이 'font-size:16px')을 기준으로 한다.
       모바일 전용 본문(--mo)은 원본처럼 줄이지 않는다 */
    .sm-terms__body--shared [style*="font-size:14px"] { font-size: 13px !important; }
    /* WWW-12 윙크스톤 동의서(20px 본문): 제목 글자와 같이 15px 로 줄어든다(원본 /winkstone_agreement1 실측) */
    .sm-terms__body--shared [style*="font-size:20px"] { font-size: 15px !important; }
    .sm-terms__body--shared [style*="font-size:15px"],
    .sm-terms__body--shared [style*="font-size:16px"] { font-size: 14px !important; }
    .sm-terms__body--shared [style*="font-size:22px"],
    .sm-terms__body--shared [style*="font-size:24px"] { font-size: 16px !important; }
}
