/* PDFEditFlow shared static-page styles: logos, theme toggle, dark theme, footer safety.
   Used by legal, contact, blog, guides and tools pages. */

/* ---------- Logos ---------- */
.brand,.logo{min-width:0}
.legal-header-logo{display:block;object-fit:contain;object-position:left center;width:auto;max-width:min(270px,100%);height:48px}
.legal-footer-logo{display:block;object-fit:contain;object-position:left center;width:auto;max-width:235px;height:54px}
.brand.has-logo-img,.logo.has-logo-img{display:inline-flex;align-items:center;max-width:300px;line-height:1.2}
.legal-fallback{display:inline-flex;align-items:center;gap:8px;font-weight:800;white-space:nowrap}
.legal-fallback-icon{width:38px;height:38px;object-fit:contain;flex:none}
.pdfef-unified-footer .pdfef-footer-logo .legal-footer-logo{margin:0}
@media(max-width:560px){.legal-header-logo{height:40px;max-width:215px}.legal-footer-logo{height:46px}}

/* ---------- Footer: never break words letter-by-letter / stack vertically ---------- */
.footer a,.footer .bottom span,.footer .legal-bottom-links,
.pdfef-unified-footer a,.pdfef-unified-footer span{writing-mode:horizontal-tb!important;text-orientation:mixed!important}
.footer .footgrid>div{min-width:0}
.footer .footgrid a{white-space:normal;overflow-wrap:normal;word-break:normal}
.footer .bottom{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.footer .bottom>span{white-space:normal;min-width:0}
.footer .bottom .legal-bottom-links{display:flex!important;align-items:center;gap:10px;flex-wrap:wrap;line-height:1.5}
.footer .bottom .legal-bottom-links a{display:inline!important;margin:0!important;line-height:1.5;white-space:nowrap}
@media(max-width:560px){.footer .bottom{align-items:flex-start;flex-direction:column}}
/* blog / guides / tools footer: columns used overflow-wrap:anywhere, which split words per letter */
.pdfef-unified-footer .pdfef-footer-grid>*,.pdfef-unified-footer a,.pdfef-unified-footer p,.pdfef-unified-footer h2{overflow-wrap:normal!important;word-break:normal!important;min-width:0}
.pdfef-unified-footer .pdfef-footer-grid{grid-template-columns:minmax(0,1.5fr) repeat(5,minmax(112px,1fr))!important}
@media(max-width:1180px){.pdfef-unified-footer .pdfef-footer-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.pdfef-unified-footer .pdfef-footer-about{grid-column:1/-1}}
@media(max-width:670px){.pdfef-unified-footer .pdfef-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:390px){.pdfef-unified-footer .pdfef-footer-grid{grid-template-columns:1fr!important}}
.pdfef-unified-footer .pdfef-footer-bottom nav{display:flex;flex-wrap:wrap;gap:8px 18px}
.pdfef-unified-footer .pdfef-footer-bottom nav a{white-space:nowrap}

/* ---------- Theme toggle button ---------- */
.legal-theme-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;border-radius:10px;border:1px solid #e1e3f3;background:#fff;color:#263452;cursor:pointer;flex:none}
.legal-theme-btn:hover{border-color:#6d5cff}
.legal-theme-btn:focus-visible{outline:3px solid #6d5cff;outline-offset:2px}
.legal-theme-btn .sun{display:none}
html[data-theme="dark"] .legal-theme-btn .sun{display:block}
html[data-theme="dark"] .legal-theme-btn .moon{display:none}

/* ---------- Dark theme ---------- */
html[data-theme="dark"]{color-scheme:dark;background:#0b0f1a;color:#eef1f8}
html[data-theme="dark"] body{background:#0b0f1a;color:#eef1f8}
html[data-theme="dark"] header{background:#0b0f1a;border-bottom-color:#263049}
html[data-theme="dark"] .brand,html[data-theme="dark"] .logo{color:#eef1f8}
html[data-theme="dark"] .brand small{color:#9aa5bd}
html[data-theme="dark"] .links a,html[data-theme="dark"] .navlinks a{color:#c9d1e6}
html[data-theme="dark"] .legal-theme-btn{background:#141a2a;border-color:#263049;color:#eef1f8}
html[data-theme="dark"] a{color:#a5b4fc}
html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .upload-kicker{color:#a5b4fc}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] summary{color:#eef1f8}
html[data-theme="dark"] p,html[data-theme="dark"] li,html[data-theme="dark"] .lead,html[data-theme="dark"] .meta,html[data-theme="dark"] .contact,html[data-theme="dark"] .crumb,html[data-theme="dark"] .results,html[data-theme="dark"] .upload-alt,html[data-theme="dark"] .embed-caption,html[data-theme="dark"] details p{color:#b4bdd2}
html[data-theme="dark"] .content,html[data-theme="dark"] .card,html[data-theme="dark"] .tgrid a,html[data-theme="dark"] .related a,html[data-theme="dark"] .linklist a,html[data-theme="dark"] .blog-filter{background:#141a2a;border-color:#263049;color:#eef1f8;box-shadow:none}
html[data-theme="dark"] .tgrid a{color:#b4bdd2}
html[data-theme="dark"] .tgrid a b{color:#c7d2fe}
html[data-theme="dark"] .blog-filter[aria-pressed="true"]{background:#5b4cf0;border-color:#5b4cf0;color:#fff}
html[data-theme="dark"] .blog-card .read{color:#a5b4fc}
html[data-theme="dark"] .blog-card .cover,html[data-theme="dark"] .article-cover{background:#1a2036}
html[data-theme="dark"] .card:hover,html[data-theme="dark"] .tgrid a:hover{border-color:#5b4cf0}
html[data-theme="dark"] section+section{border-top-color:#263049}
html[data-theme="dark"] details{border-bottom-color:#263049}
html[data-theme="dark"] .pill{background:#1f2447;color:#c7d2fe}
html[data-theme="dark"] .notice,html[data-theme="dark"] .related:not(.x){border-color:#2c3552}
html[data-theme="dark"] .notice{background:#1a2036;color:#b4bdd2}
html[data-theme="dark"] .content .related,html[data-theme="dark"] section.related{background:#1a2036}
html[data-theme="dark"] .foot{background:#0b0f1a;border-top-color:#263049;color:#9aa5bd}
html[data-theme="dark"] .iframe-shell{background:#0b0f1a;border-color:#263049;box-shadow:none}
html[data-theme="dark"] .tool-frame{background:#0b0f1a}
html[data-theme="dark"] footer:not(.pdfef-unified-footer):not(.footer){border-top-color:#263049;color:#9aa5bd}
/* contact forms */
html[data-theme="dark"] .cform label{color:#dbe1f0}
html[data-theme="dark"] .cform input,html[data-theme="dark"] .cform textarea,html[data-theme="dark"] .cform select{background:#0f1424;color:#eef1f8;border-color:#2c3552}
html[data-theme="dark"] .cform input::placeholder,html[data-theme="dark"] .cform textarea::placeholder{color:#7d88a6}
html[data-theme="dark"] .cform .status{color:#b4bdd2}
html[data-theme="dark"] .cform .status.ok{color:#6ee7a8}
html[data-theme="dark"] .cform .status.err{color:#fda4af}
html[data-theme="dark"] .cform .send{background:#5b4cf0}
/* footers are dark already; make them a touch deeper in dark mode */
html[data-theme="dark"] .footer{background:#070a14}
html[data-theme="dark"] .pdfef-unified-footer{background:#070a14!important}
html[data-theme="dark"] .footer a,html[data-theme="dark"] .pdfef-unified-footer a{color:#bcc4de}
html[data-theme="dark"] .footer a:hover,html[data-theme="dark"] .pdfef-unified-footer a:hover{color:#fff}
/* fallback (no usable dark logo) must stay readable */
html[data-theme="dark"] .legal-fallback{color:#fff}
.pdfef-unified-footer .legal-fallback,.footer .legal-fallback{color:#fff}
html[data-theme="dark"] a.action,html[data-theme="dark"] a.button,html[data-theme="dark"] .cform .send{color:#fff}
