/* Footer in the style of mobility.autopay.pl: content sits on a rounded lime panel
   (--promo-soft-color = lime-100, the same #e6ffa0 the main Autopay site uses). */
.footer {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-top: 40px;
  padding-bottom: 28px;
}

.footer__panel {
  padding: 56px 56px 32px;
  border-radius: var(--border-radius);
  background: var(--promo-soft-color);
  color: var(--ink-color);
}

.footer__panel a,
.footer__panel .apm-consent-reopen {
  color: var(--ink-color);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 8px;
  margin: 0;
  padding: 0;
}

.footer__links > li {
  margin-top: 0;
}

/* SPA (purchase flow) footer: a quiet legal bar on the app surface instead of the lime
   panel, so it never competes with the flow's CTA. */
.footer--spa { padding-top: 0; padding-bottom: 24px; }
.footer--spa .footer__panel {
  padding: 16px 0 0;
  border-top: 1px solid var(--border-color);
  border-radius: 0;
  background: none;
  font-size: 13px;
}
.footer--spa .footer__panel a,
.footer--spa .footer__panel .apm-consent-reopen { color: var(--text-muted-color); }
.footer--spa .footer__panel a:hover,
.footer--spa .footer__panel .apm-consent-reopen:hover { color: var(--ink-color); }
.footer--spa .footer__links { justify-content: center; column-gap: 20px; }

/* App download sits in the brand column, under the tagline */
.footer__app { margin-top: 28px; }
.footer__app p { max-width: 380px; margin: 0 0 16px; font-size: 15px; line-height: 1.4; }
.footer__app-stores { display: flex; flex-wrap: wrap; gap: 8px; }
/* .footer__panel a sets ink text, which would hide the badge label on its ink background */
.footer__panel .store-button { min-height: 44px; padding: 6px 14px; gap: 8px; color: var(--white-color); }
.footer__panel .store-button .store-button__icon { width: 22px; height: 22px; }
.footer__panel .store-button .store-button__name { font-size: 15px; }
/* Store badges: black tiles with the store glyph and a two-line label, like the official buttons */
.store-button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 9px 18px;
  border-radius: var(--button-radius);
  background: var(--ink-color);
  color: var(--white-color);
  line-height: 1.15;
  text-decoration: none;
}
.store-button:hover,
.store-button:focus-visible { background: var(--accent-strong-color); color: var(--white-color); text-decoration: none; }
.store-button__icon { width: 26px; height: 26px; flex: none; }
.store-button__label { display: flex; flex-direction: column; text-align: left; }
.store-button__hint { font-size: 12px; }
.store-button__name { font-size: 18px; font-weight: 600; }

.footer__navigation {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(170px, 1fr));
  gap: 40px;
}

.footer__navigation > * { min-width: 0; }
.footer__logo { display: inline-flex; min-height: 44px; align-items: center; }
.footer__brand > p {
  max-width: 380px;
  margin: 18px 0 0;
  font-family: var(--market-header-fonts);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}
.footer__group h2,
.footer__app h2 {
  margin: 0 0 16px;
  font-family: var(--market-content-fonts);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary-color);
}
.footer__app h2 { margin-bottom: 8px; }
.footer__group ul { margin: 0; padding: 0; }
.footer__group li { margin: 0 0 12px; font-size: 15px; line-height: 1.4; }
.footer__group a { overflow-wrap: anywhere; }
.footer__documents {
  margin-top: 36px;
  padding: 20px 0;
  border-block: 1px solid var(--promo-hover-color);
  font-size: 14px;
}
.footer__documents .footer__links { gap: 12px 24px; }
.footer__documents .footer__links > li { margin: 0; }
.footer__copyright {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  color: var(--text-secondary-color);
  font-size: 12px;
}

@media (max-width: 1023px) {
  .footer__navigation { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .footer { padding-top: 24px; }
  .footer__panel { padding: 32px 20px 24px; }
  /* React apps pin a CTA bar to the bottom of the viewport on mobile — reserve space under
     the footer so the bar doesn't cover its links. */
  .footer--spa { padding-top: 0; padding-bottom: 5.5rem; }
  .footer--spa .footer__panel { padding: 8px 0 0; }
  .footer--spa .footer__links { row-gap: 0; column-gap: 16px; }
  .footer--spa .footer__links a,
  .footer--spa .footer__links button { display: inline-flex; align-items: center; min-height: 36px; }
  .footer__navigation { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer__brand > p { max-width: none; font-size: 24px; }
  .footer__group li { margin: 0; }
  .footer__group a, .footer__documents a, .footer__documents button { display: inline-flex; align-items: center; min-height: 44px; }
  .footer__documents { margin-top: 28px; }
  .footer__documents .footer__links { flex-direction: column; gap: 0; }
}
