/* 3D Print Estimator - shared site footer + legal/information pages (terms, delivery & payment,
   privacy policy, contacts, FAQ). Loaded by index.html for the footer and by every page under html/
   except admin; design tokens come from styles.css (:root), which is loaded first on both. */

/* ---------------- Shared footer (index + legal pages) ---------------- */
.app-footer {
    flex: 0 0 auto;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 13px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--accent-dark); }
/* The page the visitor is on is not a link to itself — mark it with aria-current (no hover target). */
.footer-links a[aria-current="page"] { color: var(--ink); cursor: default; }
.footer-copy { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; text-align: right; max-width: 64%; }

/* ---------------- Legal pages layout ---------------- */
/* styles.css pins the app body to a fixed, non-scrolling viewport (header / two-panel grid / footer).
   Information pages need ordinary document flow instead — opt out with this class. */
body.legal-body { height: auto; min-height: 100vh; overflow: auto; }

/* data-lang blocks are toggled via the `hidden` attribute — keep that winning even where an author
   rule sets display (e.g. a future flex section). */
[data-lang][hidden] { display: none !important; }

/* The brand name links back to / on the legal pages (it is a plain span on index) — inherit, don't linkify. */
.app-header .brand a { color: inherit; text-decoration: none; }

.legal-main { flex: 1 1 auto; width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 24px 56px; }
.legal-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 34px 38px; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
.legal-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
/* "Last updated" line under the H1 on every legal page (BG/EN pair like all other blocks). */
.legal-updated { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.legal-card section { margin-top: 24px; }
.legal-card h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 8px; }
.legal-card p { font-size: 13.5px; line-height: 1.65; color: #334155; margin-top: 8px; }
.legal-card ul, .legal-card ol { margin: 8px 0 0 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-card li { font-size: 13.5px; line-height: 1.6; color: #334155; }
.legal-card a { color: var(--accent-dark); text-decoration: none; border-bottom: 1px solid rgba(79, 70, 229, 0.35); }
.legal-card a:hover { border-bottom-color: var(--accent-dark); }

/* Identity block (seller details required by Law on Electronic Commerce Art. 10) — label/value rows. */
.contact-grid { display: grid; grid-template-columns: max-content 1fr; gap: 7px 20px; margin-top: 10px; }
.contact-grid dt { font-size: 13px; font-weight: 600; color: var(--ink); }
.contact-grid dd { font-size: 13.5px; line-height: 1.55; color: #334155; margin: 0; }

/* FAQ items — question in bold, answer below it (static blocks, no JS accordion). */
.faq-item { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-card section:first-of-type .faq-item:first-child { margin-top: 4px; padding-top: 0; border-top: none; }
.faq-q { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; }

@media (max-width: 920px) {
    .legal-main { padding: 22px 14px 40px; }
    .legal-card { padding: 24px 20px; border-radius: 12px; }
    .footer-copy { text-align: left; max-width: 100%; }
}
