/* M2FORUM FOOTER — styles. HTML: Zeina "custom copyright" field; engine: m2-footer.js */

/* The copyright column holds the whole footer: let it span the full width instead of Zeina's columns. */
#page-footer .copyright.flex.flex-wrap.flex-col.gap-1 {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 0 0 100%;
}
#page-footer .copyright + div { width: 100%; min-width: 0; flex: 0 0 100%; }
/* The copyright field closes the theme's <p><span> before the footer: hide that now empty row. */
#page-footer .copyright > .footer-row:has(> .custom-copyright) { display: none; }
/* Zeina's default footer items not used here: phpBB "Confidențialitate" and "Termeni" (the footer links its own
   privacy/terms pages) and "Ora este UTC+02:00". The whole element is hidden, so no empty link stays focusable. */
#page-footer .footer-row > a.footer-link[href*="mode=privacy"],
#page-footer .footer-row > a.footer-link[href*="mode=terms"]:not(#consent-manager-link),
#page-footer .footer-row > span:not([class]):has(> span[title]) { display: none; }
#page-footer .copyright + div > .footer-row.flex.flex-wrap.items-center.gap-2 { margin: 0; line-height: 1.6; }

.m2-footer {
  --m2-accent: var(--color-primary, 73, 98, 233);
  --m2-link: var(--color-text, var(--m2-accent));
  --m2-surface: #fff;
  --m2-text: #1f2937;
  --m2-muted: #626c7d;
  --m2-line: #e5e7eb;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: none;
  border: 1px solid var(--m2-line);
  border-radius: 16px;
  margin: 8px 0 0;
  background: var(--m2-surface);
  color: var(--m2-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.dark .m2-footer, .m2-footer.dark {
  --m2-accent: var(--color-primary-dark, 129, 140, 248);
  --m2-link: var(--color-text-dark, var(--m2-accent));
  --m2-surface: #0f172a;
  --m2-text: #e2e8f0;
  --m2-muted: #a1adbf;
  --m2-line: #263247;
}
.m2-footer *, .m2-footer *::before, .m2-footer *::after { box-sizing: border-box; }
.m2-footer :is(p, ul) { margin: 0; padding: 0; }
.m2-footer a { text-decoration: none; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.m2-footer :is(a, button):focus-visible { outline: 2px solid rgb(var(--m2-link)); outline-offset: 4px; border-radius: 4px; }

/* Discord bar */
.m2-footer .m2-footer__discord { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--m2-line); border-radius: 15px 15px 0 0; background: rgba(var(--m2-accent), .055); }
.m2-footer .m2-footer__discord-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 11px; background: rgba(var(--m2-accent), .1); color: rgb(var(--m2-link)); }
.m2-footer .m2-footer__discord-icon svg { width: 25px; height: 20px; }
.m2-footer .m2-footer__discord-copy { flex: 1; min-width: 0; }
.m2-footer .m2-footer__discord-title { color: var(--m2-text); font-size: 15px; font-weight: 650; line-height: 1.4; text-transform: none; letter-spacing: -.015em; }
.m2-footer .m2-footer__discord-description { margin-top: 2px; color: var(--m2-muted); font-size: 12px; line-height: 1.5; }
.m2-footer .m2-footer__discord-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex-shrink: 0; min-height: 38px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; background: rgb(var(--color-primary, 73, 98, 233)); color: #fff; font-size: 12px; font-weight: 600; }
.m2-footer .m2-footer__discord-button:hover { background: rgba(var(--color-primary, 73, 98, 233), .9); color: #fff; }
.m2-footer .m2-footer__discord-button:active { background: rgba(var(--color-primary, 73, 98, 233), .85); color: #fff; }

/* Brand and link columns */
.m2-footer .m2-footer__main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.2fr); gap: 32px; padding: 28px 24px 26px; }
.m2-footer .m2-footer__brand { display: inline-block; max-width: 100%; vertical-align: top; }
.m2-footer .m2-footer__logo { display: block; width: 240px; max-width: 100%; height: auto; aspect-ratio: 438 / 91; }
.m2-footer .m2-footer__logo-box { fill: url(#m2-footer-logo-gradient); }
.m2-footer .m2-footer__logo-wordmark { fill: var(--m2-text); }
.m2-footer .m2-footer__logo-symbol, .m2-footer .m2-footer__logo-home { fill: #fff; transition: transform 200ms cubic-bezier(.4, 0, .2, 1); }
.m2-footer .m2-footer__logo-home { transform: translateX(-91px); }
.m2-footer .m2-footer__brand:is(:hover, :focus-visible) .m2-footer__logo-symbol { transform: translateX(91px); }
.m2-footer .m2-footer__brand:is(:hover, :focus-visible) .m2-footer__logo-home { transform: translateX(0); }
.m2-footer .m2-footer__description { max-width: 40ch; margin-top: 12px; color: var(--m2-text); font-size: 13px; }
.m2-footer .m2-footer__resources { max-width: 44ch; margin-top: 10px; color: var(--m2-muted); font-size: 12px; }
.m2-footer .m2-footer__nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.m2-footer .m2-footer__column { min-width: 0; padding-inline-start: 26px; padding-inline-end: 16px; border-inline-start: 1px solid var(--m2-line); }
.m2-footer .m2-footer__column:last-child { padding-inline-end: 0; }
.m2-footer .m2-footer__heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--m2-text); font-size: 13px; font-weight: 650; line-height: 1.5; text-transform: none; letter-spacing: 0; }
.m2-footer .m2-footer__heading svg { flex: 0 0 20px; width: 20px; height: 20px; color: rgb(var(--m2-link)); }
.m2-footer .m2-footer__links { list-style: none; }
.m2-footer .m2-footer__links li { margin: 0; padding: 0; }
.m2-footer .m2-footer__links a { display: flex; align-items: flex-start; gap: 8px; width: fit-content; max-width: 100%; padding: 4px 0; color: var(--m2-muted); font-size: 12px; line-height: 1.6; }
.m2-footer .m2-footer__links a::before { content: ""; flex: 0 0 5px; width: 5px; height: 5px; margin: 7px 2px 0 1px; border-top: 1px solid rgb(var(--m2-link)); border-right: 1px solid rgb(var(--m2-link)); transform: rotate(45deg); opacity: .7; }
.m2-footer .m2-footer__links a:hover { color: rgb(var(--m2-link)); text-decoration: underline; text-underline-offset: 4px; }

/* "Știai că?" */
.m2-footer .m2-footer__fact { display: flex; align-items: center; gap: 16px; margin: 0 24px; padding: 14px 18px; border: 1px solid var(--m2-line); border-radius: 10px; background: rgba(var(--m2-accent), .055); }
.m2-footer .m2-footer__fact-icon { display: grid; place-items: center; flex: 0 0 32px; color: rgb(var(--m2-link)); font-size: 28px; }
.m2-footer .m2-footer__fact-copy { flex: 1; min-width: 0; }
.m2-footer .m2-footer__fact-label { margin-bottom: 3px; color: rgb(var(--m2-link)); font-size: 13px; font-weight: 650; line-height: 1.4; text-transform: none; letter-spacing: 0; }
.m2-footer .m2-footer__fact-text { color: var(--m2-muted); font-size: 12px; line-height: 1.6; }
.m2-footer .m2-footer__fact-next { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; margin: 0; padding: 0; border: 1px solid rgba(var(--m2-accent), .2); border-radius: 50%; background: transparent; color: rgb(var(--m2-link)); font-size: 18px; cursor: pointer; }
.m2-footer .m2-footer__fact-next:hover { background: rgba(var(--m2-accent), .12); }
.m2-footer .m2-footer__fact-next:active { background: rgba(var(--m2-accent), .2); }

/* Bottom row: credits, legal links (moved in by m2-footer.js), badge */
.m2-footer .m2-footer__bottom { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 2.2fr) auto; align-items: center; gap: 18px; margin: 24px 24px 0; padding: 18px 0 20px; border-top: 1px solid var(--m2-line); }
.m2-footer .m2-footer__credits { min-width: 0; color: var(--m2-muted); font-size: 11px; }
.m2-footer .m2-footer__credits a { color: var(--m2-text); font-weight: 600; }
.m2-footer .m2-footer__credits a:hover { color: rgb(var(--m2-link)); text-decoration: underline; }
.m2-footer .m2-footer__separator { display: inline-block; padding: 0 7px; }
.m2-footer .m2-footer__thanks { font-size: inherit; line-height: inherit; }
.m2-footer .m2-footer__thanks-name { font-weight: 600; color: var(--m2-text); }
.m2-footer .m2-footer__badge { display: block; width: 112px; max-width: 100%; height: auto; }
.m2-footer .m2-footer__legal { min-width: 0; padding-inline-start: 14px; border-inline-start: 1px solid var(--m2-line); }
/* Keep native links and their icons; replace standalone pipe separators with spacing. */
.m2-footer .m2-footer__legal .footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px 12px; margin: 0; padding: 0; color: var(--m2-muted); font-size: 13px; line-height: 1.5; }
.m2-footer .m2-footer__legal .footer-row > .opacity-50 { display: none; }
.m2-footer .m2-footer__legal .rightside { float: none; }
.m2-footer .m2-footer__legal a { display: inline-flex; align-items: center; gap: 6px; color: var(--m2-muted); white-space: nowrap; }
.m2-footer .m2-footer__legal a:hover { color: rgb(var(--m2-link)); text-decoration: none; }
.m2-footer .m2-footer__legal .icon { color: rgb(var(--m2-link)); font-size: 15px; }
.m2-footer .m2-footer__fact-next[hidden], .m2-footer .m2-footer__legal[hidden] { display: none; }
.m2-footer .m2-footer__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .m2-footer .m2-footer__main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .m2-footer .m2-footer__description, .m2-footer .m2-footer__resources { max-width: 65ch; }
  .m2-footer .m2-footer__column:first-child { border-inline-start: 0; padding-inline-start: 0; }
  .m2-footer .m2-footer__bottom { grid-template-columns: minmax(0, 1fr) auto; }
  .m2-footer .m2-footer__credits { grid-column: 1; grid-row: 1; }
  .m2-footer .m2-footer__badge { grid-column: 2; grid-row: 1; }
  .m2-footer .m2-footer__legal { grid-column: 1 / -1; grid-row: 2; padding: 14px 0 0; border-inline-start: 0; border-top: 1px solid var(--m2-line); }
}
@media (max-width: 600px) {
  .m2-footer .m2-footer__discord { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .m2-footer .m2-footer__discord-title { font-size: 14px; }
  .m2-footer .m2-footer__discord-button { width: 100%; min-height: 42px; }
  .m2-footer .m2-footer__main { padding: 24px 18px; }
  .m2-footer .m2-footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .m2-footer .m2-footer__column { border: 0; padding: 0; }
  .m2-footer .m2-footer__heading { gap: 8px; }
  .m2-footer .m2-footer__links a { padding: 6px 0; }
  .m2-footer .m2-footer__fact { align-items: flex-start; gap: 10px; margin: 0 18px; padding: 14px; }
  .m2-footer .m2-footer__fact-icon { flex-basis: 24px; font-size: 24px; }
  .m2-footer .m2-footer__fact-next { flex-basis: 32px; width: 32px; height: 32px; }
  .m2-footer .m2-footer__bottom { gap: 14px; margin: 20px 18px 0; }
  .m2-footer .m2-footer__legal .footer-row { gap: 10px 14px; }
}
@media (max-width: 480px) {
  .m2-footer .m2-footer__bottom { grid-template-columns: minmax(0, 1fr); }
  .m2-footer .m2-footer__credits { grid-column: 1; grid-row: 1; }
  .m2-footer .m2-footer__legal { grid-column: 1; grid-row: 2; }
  .m2-footer .m2-footer__badge { grid-column: 1; grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .m2-footer a, .m2-footer .m2-footer__logo-symbol, .m2-footer .m2-footer__logo-home { transition: none; }
}
