/* Mediops — юридические страницы, подвал, баннер cookie */
.legal-container {
    width: min(1160px, 100% - 40px);
    margin: 0 auto;
}

:root {
    --legal-text: #0f172a;
    --legal-muted: #64748b;
    --legal-line: #e2e8f0;
    --legal-primary: #4f46e5;
    --legal-bg: #f8fafc;
}

.site-footer--legal {
    margin-top: 48px;
    padding: 32px 0 40px;
    border-top: 1px solid var(--legal-line);
    background: #fff;
    font-size: 0.82rem;
    color: var(--legal-muted);
    line-height: 1.5;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 40px;
    align-items: start;
}

.site-footer-links {
    justify-self: start;
    text-align: left;
}

.site-footer-requisites {
    justify-self: end;
    text-align: right;
}

.site-footer-links strong {
    display: block;
    color: var(--legal-text);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 12px;
}

.site-footer-nav a {
    color: #334155;
    font-weight: 600;
    text-decoration: none;
}

.site-footer-nav a:hover { color: var(--legal-primary); }

.site-footer-requisites p { margin: 0 0 4px; }

.site-footer-requisites .label { color: var(--legal-muted); }

.site-footer-requisites .value { color: #334155; }

.site-footer-messengers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.site-footer-messengers img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.site-footer-messengers a:not(:has(img)) {
    color: #334155;
    font-weight: 600;
    text-decoration: none;
}

.site-footer-messengers a:not(:has(img)):hover {
    color: var(--legal-primary);
}

.legal-header {
    background: #0b1120;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 14px 0;
}

.legal-header-inner {
    width: min(1160px, 100% - 40px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.legal-logo {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

.legal-logo span { color: #a5b4fc; }

.legal-header nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.legal-header nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.legal-header nav a:hover { color: #fff; }

.legal-page {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--legal-text);
    background: var(--legal-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-main {
    flex: 1;
    width: min(820px, 100% - 40px);
    margin: 0 auto;
    padding: 40px 0 24px;
}

.legal-main h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.legal-updated {
    color: var(--legal-muted);
    font-size: 0.88rem;
    margin-bottom: 28px;
}

.legal-doc {
    background: #fff;
    border: 1px solid var(--legal-line);
    border-radius: 16px;
    padding: 28px 32px;
}

.legal-doc h2 {
    font-size: 1.1rem;
    margin: 24px 0 10px;
}

.legal-doc h2:first-child { margin-top: 0; }

.legal-doc p, .legal-doc li {
    color: #334155;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.legal-doc ul { padding-left: 1.25rem; margin-bottom: 12px; }

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

.legal-doc th, .legal-doc td {
    border: 1px solid var(--legal-line);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.legal-doc th {
    background: #f1f5f9;
    width: 32%;
    font-weight: 600;
}

.legal-doc a { color: var(--legal-primary); }

/* Cookie banner */
.cookie-banner {
    position: fixed;
    z-index: 10000;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 520px;
    margin: 0 auto;
    padding: 14px 16px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.35);
    font-size: 0.82rem;
    line-height: 1.45;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-banner p { flex: 1 1 200px; margin: 0; }

.cookie-banner a { color: #a5b4fc; font-weight: 600; }

.cookie-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-banner-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
}

.cookie-banner-btn--accept {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.cookie-banner-btn--accept:hover { filter: brightness(1.06); }

@media (max-width: 720px) {
    .site-footer-grid { grid-template-columns: 1fr; }
    .site-footer-links,
    .site-footer-requisites {
        justify-self: stretch;
        text-align: left;
    }
    .legal-doc { padding: 20px 18px; }
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
}

/* Auth consent checkbox */
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--auth-muted, #64748b);
    margin: 4px 0 16px;
    cursor: pointer;
}

.auth-consent input {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--auth-accent, #6366f1);
}

.auth-consent a { color: var(--auth-accent, #6366f1); font-weight: 600; }

.auth-legal-bar {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--auth-line, #e2e8f0);
    font-size: 0.75rem;
    color: var(--auth-muted, #64748b);
    line-height: 1.5;
}

.auth-legal-bar a {
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    margin-right: 10px;
}

.auth-legal-bar a:hover { color: var(--auth-accent, #6366f1); }
