/* ═══════════════════════════════════════════════════════════════════════════
   legal.css — หน้าเอกสารทางกฎหมาย (นโยบายความเป็นส่วนตัว / การลบข้อมูลผู้ใช้)
   ใช้ร่วมทั้งภาษาไทยและอังกฤษ

   เขียนแบบ flat + ตั้งชื่อคลาสตามลำดับ parent-child แทน nested CSS
   ด้วยเหตุผลเดียวกับ city-list.css — เป็นหน้าสาธารณะที่มีทราฟฟิกจากเบราว์เซอร์เก่า
═══════════════════════════════════════════════════════════════════════════ */

:root {
    --legal-nav-height: 60px;
    --legal-gap-top: 32px;

    --legal-accent: #ff6701;
    --legal-accent-hover: #d95700;
    --legal-text: #1a1a2e;
    --legal-text-body: #3d3d4e;
    --legal-text-muted: #6b7280;
    --legal-border: #e5e7eb;
    --legal-surface: #ffffff;
    --legal-surface-alt: #fafbfc;
    --legal-radius: 12px;
}

/* navbar เป็น fixed-top → ต้องเผื่อความสูงไว้ ไม่งั้นหัวข้อโดนบัง */
.legal-page {
    background-color: var(--legal-surface-alt);
    padding-top: calc(var(--legal-nav-height) + var(--legal-gap-top));
    padding-bottom: 56px;
}

.legal-page .container {
    max-width: 900px;
}

/* ── หัวหน้าเพจ ── */

.legal-header {
    margin-bottom: 24px;
}

.legal-header .legal-breadcrumb {
    font-size: 13px;
    line-height: 1.6;
    color: var(--legal-text-muted);
    margin-bottom: 6px;
}

.legal-header .legal-breadcrumb a {
    color: var(--legal-text-muted);
}

.legal-header .legal-breadcrumb a:hover {
    color: var(--legal-accent);
}

.legal-header h1 {
    font-size: 26px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--legal-text);
    margin: 0 0 8px;
}

.legal-header .legal-updated {
    font-size: 14px;
    line-height: 1.6;
    color: var(--legal-text-muted);
    margin: 0;
}

/* ── กล่องเนื้อหา ── */

.legal-card {
    background-color: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    padding: 32px 36px;
}

.legal-card h2 {
    font-size: 20px;
    line-height: 1.5;
    font-weight: 600;
    color: var(--legal-text);
    margin: 32px 0 12px;
    padding-top: 24px;
    border-top: 1px solid var(--legal-border);
}

.legal-card h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legal-card h3 {
    font-size: 17px;
    line-height: 1.5;
    font-weight: 600;
    color: var(--legal-text);
    margin: 22px 0 8px;
}

.legal-card h4 {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
    color: var(--legal-text);
    margin: 16px 0 6px;
}

.legal-card p {
    font-size: 15px;
    line-height: 1.9;
    color: var(--legal-text-body);
    margin: 0 0 14px;
}

.legal-card ul,
.legal-card ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

.legal-card li {
    font-size: 15px;
    line-height: 1.9;
    color: var(--legal-text-body);
    margin-bottom: 4px;
}

.legal-card a {
    color: var(--legal-accent);
    word-break: break-word;
}

.legal-card a:hover {
    color: var(--legal-accent-hover);
    text-decoration: underline;
}

.legal-card strong {
    color: var(--legal-text);
    font-weight: 600;
}

/* ── กล่องเน้นข้อความสำคัญ ── */

.legal-note {
    background-color: #fff8f3;
    border: 1px solid #ffd6b8;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 0 0 20px;
}

.legal-note p:last-child {
    margin-bottom: 0;
}

/* ── ขั้นตอน (ใช้ในหน้าลบข้อมูล) ── */

.legal-steps {
    counter-reset: legal-step;
    list-style: none;
    padding-left: 0;
    margin: 0 0 20px;
}

.legal-steps > li {
    counter-increment: legal-step;
    position: relative;
    padding-left: 44px;
    padding-bottom: 18px;
    margin-bottom: 0;
}

.legal-steps > li:before {
    content: counter(legal-step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: var(--legal-accent);
    border-radius: 50%;
}

/* ── ตารางสรุป ── */

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
}

.legal-table th,
.legal-table td {
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid var(--legal-border);
    vertical-align: top;
}

.legal-table th {
    background-color: var(--legal-surface-alt);
    font-weight: 600;
    color: var(--legal-text);
}

.legal-table td {
    color: var(--legal-text-body);
}

/* ── Responsive ── */

@media only screen and (max-width: 1000px) {
    :root {
        --legal-nav-height: 80px;
    }
}

@media only screen and (max-width: 767px) {
    :root {
        --legal-nav-height: 60px;
    }
}

@media (max-width: 1200px) {
    :root {
        --legal-gap-top: 28px;
    }
}

@media (max-width: 768px) {
    :root {
        --legal-gap-top: 24px;
    }

    .legal-page {
        padding-bottom: 40px;
    }

    .legal-header h1 {
        font-size: 22px;
    }

    .legal-card {
        padding: 22px 20px;
    }

    .legal-card h2 {
        font-size: 18px;
        margin-top: 26px;
        padding-top: 20px;
    }

    .legal-card h3 {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .legal-header h1 {
        font-size: 20px;
    }

    .legal-card {
        padding: 18px 16px;
    }

    .legal-card p,
    .legal-card li {
        font-size: 14px;
        line-height: 1.85;
    }

    .legal-steps > li {
        padding-left: 38px;
    }
}
