/* =============================================================
 *  legal.css — Shared styles for Legal, Privacy & Cookies pages
 *  Loaded conditionally via template_include
 * ============================================================= */

/* ─── 0. ASTRA RESETS ─── */
.mch-legal .site-content,
.mch-privacy .site-content,
.mch-cookies .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.mch-legal #primary,
.mch-privacy #primary,
.mch-cookies #primary {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.mch-legal .site-main,
.mch-privacy .site-main,
.mch-cookies .site-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.mch-legal .entry-header,
.mch-privacy .entry-header,
.mch-cookies .entry-header {
    display: none;
}
.mch-legal .page-header,
.mch-legal .ast-breadcrumbs-wrapper,
.mch-privacy .page-header,
.mch-privacy .ast-breadcrumbs-wrapper,
.mch-cookies .page-header,
.mch-cookies .ast-breadcrumbs-wrapper {
    display: none;
}
.mch-legal .site-main > .entry-content,
.mch-legal .site-main > article,
.mch-privacy .site-main > .entry-content,
.mch-privacy .site-main > article,
.mch-cookies .site-main > .entry-content,
.mch-cookies .site-main > article {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.mch-legal .ast-container,
.mch-privacy .ast-container,
.mch-cookies .ast-container {
    padding-top: 0 !important;
}

/* ─── 1. HERO ─── */
.mch-legal-hero {
    position: relative;
    left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw;
    width: 100vw; max-width: 100vw;
    background: linear-gradient(160deg, #0a1628 0%, #0d3b66 50%, #1a6fb5 100%);
    color: #fff;
    text-align: center;
    padding: 48px 24px 40px;
    overflow: hidden;
}
.mch-legal-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
}
.mch-legal-hero__inner {
    position: relative; z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}
.mch-legal-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}
.mch-legal-hero h1 {
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.2;
}
.mch-legal-hero p {
    color: rgba(255,255,255,0.7);
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    line-height: 1.6;
    margin: 0 0 20px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.mch-legal-hero__updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

/* ─── 2. TABLE OF CONTENTS ─── */
.mch-legal-toc {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.mch-legal-toc__inner {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 16px;
    padding: 32px 36px;
    margin-top: -28px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.mch-legal-toc__inner h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 20px;
}
.mch-legal-toc__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}
.mch-legal-toc__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.mch-legal-toc__item:hover {
    background: #f1f5f9;
    color: var(--ast-global-color-0);
}
.mch-legal-toc__item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--ast-global-color-0);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.mch-legal-toc__item:hover span {
    background: var(--ast-global-color-0);
    color: #fff;
}

/* ─── 3. CONTENT SECTIONS ─── */
.mch-legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}
.mch-legal-content__inner {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mch-legal-section {
    padding: 36px 0;
    border-bottom: 1px solid #f1f5f9;
}
.mch-legal-section:last-child {
    border-bottom: none;
}
.mch-legal-section h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 18px;
    line-height: 1.3;
}
.mch-legal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ast-global-color-0), #60a5fa);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}
.mch-legal-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin: 24px 0 10px;
}
.mch-legal-section p {
    color: #4b5563;
    font-size: 0.93rem;
    line-height: 1.75;
    margin: 0 0 12px;
}
.mch-legal-section p:last-child {
    margin-bottom: 0;
}
.mch-legal-section ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}
.mch-legal-section ul li {
    position: relative;
    padding-left: 20px;
    color: #4b5563;
    font-size: 0.93rem;
    line-height: 1.75;
    margin-bottom: 8px;
}
.mch-legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ast-global-color-0);
}

/* ─── ENTITY CARD ─── */
.mch-legal-entity {
    background: #f8fafc;
    border: 1px solid #e8ecf0;
    border-radius: 14px;
    padding: 24px 28px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mch-legal-entity__row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.92rem;
    color: #374151;
    line-height: 1.5;
}
.mch-legal-entity__row i {
    color: var(--ast-global-color-0);
    font-size: 0.9rem;
    margin-top: 3px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.mch-legal-entity__row strong {
    color: #1e293b;
}

/* ─── CONTACT BUTTON ─── */
.mch-legal-contact {
    margin-top: 16px;
}
.mch-legal-contact__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ast-global-color-0);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mch-legal-contact__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.25);
    color: #fff;
}

/* ─── ACCEPT NOTICE ─── */
.mch-legal-accept {
    position: relative;
    left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw;
    width: 100vw; max-width: 100vw;
    background: #f1f5f9;
    padding: 32px 24px;
    text-align: center;
}
.mch-legal-accept__inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.mch-legal-accept__inner i {
    color: #10b981;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.mch-legal-accept__inner p {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

/* ─── COOKIE TABLE ─── */
.mch-legal-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    border-radius: 12px;
    border: 1px solid #e8ecf0;
}
.mch-legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 600px;
}
.mch-legal-table thead {
    background: #f1f5f9;
}
.mch-legal-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #e2e8f0;
}
.mch-legal-table td {
    padding: 12px 16px;
    color: #4b5563;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    line-height: 1.5;
}
.mch-legal-table tbody tr:last-child td {
    border-bottom: none;
}
.mch-legal-table tbody tr:hover {
    background: #fafbfd;
}
.mch-legal-table code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--ast-global-color-0);
    white-space: nowrap;
}
.mch-legal-section h3 i {
    margin-right: 6px;
    color: var(--ast-global-color-0);
    font-size: 0.85rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .mch-legal-hero {
        padding: 40px 16px 32px;
    }
    .mch-legal-toc__inner {
        padding: 24px 20px;
    }
    .mch-legal-toc__grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .mch-legal-content {
        padding: 28px 16px 16px;
    }
    .mch-legal-section {
        padding: 28px 0;
    }
    .mch-legal-entity {
        padding: 20px;
    }
    .mch-legal-accept__inner {
        flex-direction: column;
        text-align: center;
    }
    .mch-legal-accept__inner p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mch-legal-section h2 {
        gap: 10px;
    }
    .mch-legal-num {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
}
