/* MailPac legal pages: terms and conditions (app/Views/front_end/term_condition_view.php) and the
   privacy policy (privacy_policy_view.php). Loaded after site.css, which holds the tokens, page
   header, prose and buttons. The text itself is the admin's saved HTML. */

.mp-legal__updated {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}
.mp-legal__updated svg { width: 18px; height: 18px; color: var(--mp-pink); }

.mp-legal-section { padding-top: 64px; }
.mp-legal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
}

/* ------------------------------------------------- the document */
.mp-legal__doc.mp-prose {
    max-width: none;
    padding: 44px 48px;
    border-radius: var(--mp-radius);
    border: 1px solid var(--mp-line);
    background: var(--mp-white);
    box-shadow: 0 6px 18px rgba(12, 62, 157, 0.06);
    overflow-wrap: anywhere;
}
.mp-legal__doc > :first-child { margin-top: 0; }
.mp-legal__doc h1 { font-size: 28px; font-weight: 600; line-height: 1.25; color: var(--mp-blue); }
.mp-legal__doc h4,
.mp-legal__doc h5,
.mp-legal__doc h6 { font-size: 17px; font-weight: 600; color: var(--mp-blue); }
.mp-legal__doc img { height: auto; }
/* a wide table scrolls inside the document instead of squeezing words apart */
.mp-legal__doc table { display: block; max-width: 100%; overflow-x: auto; overflow-wrap: normal; }
.mp-legal__doc th { white-space: nowrap; }
/* Pasted text keeps the editor's fonts; the page font wins so the document reads as one. */
.mp-legal__doc font { font-family: inherit; }
.mp-legal__doc [style*="font-family"] { font-family: inherit !important; }

/* ------------------------------------------------- nothing published yet */
.mp-legal__empty {
    padding: 48px 32px;
    border-radius: var(--mp-radius);
    border: 1px dashed #C9D3EA;
    background: var(--mp-sky-2);
    text-align: center;
}
.mp-legal__empty-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--mp-white);
    color: var(--mp-blue);
    box-shadow: 0 6px 18px rgba(12, 62, 157, 0.08);
}
.mp-legal__empty-icon svg { width: 30px; height: 30px; }
.mp-legal__empty h2 { font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--mp-blue); }
.mp-legal__empty p { max-width: 520px; margin: 10px auto 0; color: var(--mp-muted); }

/* ------------------------------------------------- side cards */
.mp-legal__aside {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 18px;
}
.mp-legal__card {
    padding: 24px;
    border-radius: var(--mp-radius);
    border: 1px solid var(--mp-line);
    background: var(--mp-sky-2);
}
.mp-legal__card h2 { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--mp-blue); }
.mp-legal__card p { margin-top: 8px; font-size: 15px; color: var(--mp-muted); }
.mp-legal__card .mp-btn { margin-top: 18px; }
.mp-legal__links { display: grid; gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.mp-legal__links a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 6px 10px;
    margin: 0 -10px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--mp-ink);
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}
.mp-legal__links a:hover { background: var(--mp-white); color: var(--mp-blue); }
.mp-legal__links svg { flex: none; width: 20px; height: 20px; color: var(--mp-pink); }
.mp-legal__card--blue {
    border: 0;
    background: linear-gradient(140deg, var(--mp-blue) 0%, var(--mp-blue-900) 100%);
    color: var(--mp-white);
}
.mp-legal__card--blue h2 { color: var(--mp-white); }
.mp-legal__card--blue p { color: rgba(255, 255, 255, 0.85); }

/* ------------------------------------------------- responsive */
@media (max-width: 960px) {
    .mp-legal { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .mp-legal__aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .mp-legal-section { padding-top: 40px; }
    .mp-legal__doc.mp-prose { padding: 26px 20px; }
    .mp-legal__empty { padding: 36px 20px; }
    .mp-legal__aside { grid-template-columns: minmax(0, 1fr); }
}
