/* Legal / terms pages (loaded by Views/Legal/_Layout.cshtml) */

/* Page-width wrapper used by the legal header, banner, body and footer */
.legal-wrap {
    max-width: 940px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.legal-header .legal-wrap {
    min-height: 72px;
}

.legal-header-logo {
    height: 36px;
    width: auto;
}

/* Banner */
.legal-banner {
    background: var(--lpg-blue);
    color: #fff;
    padding: 44px 0;
}

.legal-banner-label {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 4px;
}

.legal-banner h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    color: #fff;
}

/* Document body */
.legal-doc {
    padding: 48px 0 56px;
}

.legal-title {
    color: var(--lpg-orange);
    font-weight: 300;
    font-size: 36px;
    line-height: 1.3;
    text-align: center;
    margin: 0 0 32px;
}

.legal-doc h2 { font-size: 17px; font-weight: 700; color: inherit; margin: 30px 0 8px; }
.legal-doc h3 { font-size: 16px; font-weight: 700; color: inherit; margin: 22px 0 6px; }
.legal-doc p  { margin: 0 0 14px; }
.legal-doc a  { word-break: break-word; }
.legal-doc ul { margin: 0 0 14px; padding-left: 22px; }
.legal-doc li { margin-bottom: 6px; }

/* Numbered clauses */
.legal-doc ol.clauses {
    list-style: none;
    counter-reset: c;
    margin: 0;
    padding: 0;
}

.legal-doc ol.clauses > li {
    counter-increment: c;
    position: relative;
    padding-left: 38px;
    margin-bottom: 14px;
    text-align: justify;
}

.legal-doc ol.clauses > li::before {
    content: counter(c) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}

/* Sub-clauses, numbered from their section heading: 2.1, 2.2 ...
   (section headings are written "1. ...", "2. ..." in order, so a counter on h2 matches) */
.legal-doc { counter-reset: section; }
.legal-doc h2 { counter-increment: section; }
.legal-doc ol.sub { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: sub; }
.legal-doc ol.sub > li { counter-increment: sub; position: relative; padding-left: 42px; margin-bottom: 10px; }
.legal-doc ol.sub > li::before {
    content: counter(section) "." counter(sub);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}
.legal-doc ol.sub > li > ul { margin-top: 8px; }

/* Definition lists */
.legal-doc dl.defs { margin: 0 0 14px; }
.legal-doc dl.defs dt { font-weight: 700; margin-top: 10px; }
.legal-doc dl.defs dd { margin: 2px 0 0 0; }

@media (min-width: 640px) {
    .legal-doc dl.defs { display: grid; grid-template-columns: 230px 1fr; column-gap: 16px; }
    .legal-doc dl.defs dt,
    .legal-doc dl.defs dd { margin-top: 8px; }
}

/* Footer */
.legal-footer {
    background: var(--lpg-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 400;
}

.legal-footer a {
    color: #fff;
}

.legal-doc-control {
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    padding: 18px 0;
}

.legal-doc-control dl {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    margin: 0;
}

.legal-doc-control dt {
    display: inline;
    font-weight: 400;
    opacity: .8;
}

.legal-doc-control dd {
    display: inline;
    margin: 0 0 0 4px;
    font-weight: 700;
}

.legal-footer-links {
    padding: 16px 0;
    text-align: center;
}

@media (max-width: 480px) {
    .legal-title { font-size: 28px; }
    .legal-banner h2 { font-size: 24px; }
    .legal-doc ol.clauses > li { text-align: left; }
}
