/*
 * Styling for the legal pages rendered from docs/legal/ markdown
 * (TODO-0001..0004): Terms and Conditions, Privacy Statement, Cookie
 * Policy, GDPR DSR intake.
 *
 * Scoped under .legal-doc so the rules only apply to that container and
 * do not leak into other content.
 */

.legal-doc {
    max-width: 920px;
    margin: 32px auto 48px;
    padding: 0 16px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: #222222;
}

.legal-doc h1 {
    margin: 0 0 24px;
    color: #222222;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.legal-doc h2 {
    margin: 32px 0 12px;
    color: #284f70;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.legal-doc h3 {
    margin: 24px 0 10px;
    color: #356b96;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.legal-doc h4 {
    margin: 16px 0 8px;
    color: #356b96;
    font-size: 15px;
    font-weight: 600;
}

.legal-doc p {
    margin: 0 0 14px;
}

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

.legal-doc li {
    margin-bottom: 6px;
}

.legal-doc a {
    color: #356b96;
    text-decoration: underline;
}

.legal-doc a:hover {
    color: #284f70;
}

.legal-doc code {
    padding: 1px 4px;
    background: #f3f5f7;
    border-radius: 3px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.92em;
}

.legal-doc strong {
    font-weight: 700;
}

.legal-doc em {
    font-style: italic;
}

.legal-doc hr {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid #d6d6d6;
}

.legal-doc table {
    width: 100%;
    margin: 12px 0 16px;
    border-collapse: collapse;
    font-size: 13.5px;
}

.legal-doc th,
.legal-doc td {
    padding: 8px 10px;
    border: 1px solid #d6d6d6;
    text-align: left;
    vertical-align: top;
}

.legal-doc th {
    background: #f0f4f8;
    color: #222222;
    font-weight: 700;
}

.legal-doc tr:nth-child(even) td {
    background: #fafbfc;
}

.legal-doc .legal-meta {
    margin: 32px 0 0;
    padding-top: 16px;
    border-top: 1px solid #ececec;
    color: #666666;
    font-size: 13px;
}

@media (max-width: 640px) {
    .legal-doc {
        margin: 16px auto 24px;
        font-size: 14px;
    }

    .legal-doc h1 { font-size: 22px; }
    .legal-doc h2 { font-size: 17px; margin-top: 24px; }
    .legal-doc h3 { font-size: 15px; }
    .legal-doc table { font-size: 12.5px; }
    .legal-doc th, .legal-doc td { padding: 6px 7px; }
}

/*
 * Bottom .copy strip overrides.
 *
 * The pre-1.0.6 .copy strip was designed for three short company links
 * (Why Us / Overview / Careers, ~30 chars total) constrained to 300px
 * width inside a 52px-tall single-line bar via .right { float: right;
 * width: 300px } in default.css and a flat .copy { height: 52px;
 * line-height: 52px } rule. With the four full-title legal labels plus
 * the Cookie settings trigger added in TODO-0001..0004 (~100+ chars
 * total in BG and EN), that constraint causes the links to overflow
 * below the visible bar and clip. At <=640px width, default.css's
 * max-640px.css partner additionally sets .right.link { display:
 * none }, which would hide the legal links entirely on mobile.
 *
 * The rules below relax those constraints specifically for the .copy
 * strip so legal-link visibility no longer depends on the original
 * footer link count. Selector specificity (.copy .right.link, three
 * classes) beats max-640px.css's two-class .right.link selector, so
 * no !important is needed.
 */

.copy {
    height: auto;
    line-height: 1.6;
    padding: 14px 0;
}

.copy .wrap2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
}

.copy .right.link {
    float: none;
    width: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.copy .right.link a {
    margin-right: 0;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .copy {
        font-size: 12px;
        padding: 12px 8px;
    }
    .copy .wrap2 {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .copy .right.link {
        display: flex;
        justify-content: center;
        gap: 6px 14px;
    }
}
