/* Company-name hierarchy shared only by the LPs that explicitly load this file. */
.lp-footer-company {
  display: block;
  max-width: 100%;
  color: inherit;
  letter-spacing: normal;
  text-align: left;
  white-space: normal;
}

.lp-footer-company .lp-footer-company__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
}

.lp-footer-company .lp-footer-company__name {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  white-space: nowrap;
}

.lp-footer-company .lp-footer-company__notice {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.lp-footer-company .lp-footer-company__previous {
  display: block;
  margin: 4px 0 0;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  overflow-wrap: anywhere;
}

/* Configured headings are shared by the footer and welcome dialog. */
.lp-footer-company--configured {
  display: none;
}

footer .lp-footer-company--configured {
  display: block;
  margin: 20px 0 16px;
  padding-inline-end: 56px;
}

body.lp-footer-company-configured footer company-info {
  display: none;
}

[role="dialog"] .lp-footer-company--configured {
  display: block;
}

[role="dialog"] p.not-prose > br:has(~ .lp-footer-company--configured) {
  display: none;
}

/* Selected welcome popups keep company details inside the intro's left edge. */
body[data-popup-company-align] [role="dialog"] p.not-prose {
  width: 100%;
  margin-inline: auto;
  padding-inline: 0;
}

body[data-popup-company-align] [role="dialog"] .amr-lp-footer-groups {
  justify-content: flex-start;
}

/* Override the generated utility that forces association details to center. */
@layer theme {
  body[data-popup-company-align] [role="dialog"] p.not-prose,
  body[data-popup-company-align] [role="dialog"] .amr-lp-footer-group2 {
    text-align: left !important;
  }
}

@media (min-width: 640px) {
  body[data-popup-company-align] [role="dialog"] .bg-gray-50 {
    padding-inline: 1.5rem;
  }

  body[data-popup-company-align] [role="dialog"] p.not-prose {
    width: 75%;
  }
}

/* Move the existing bottom padding into the company information section. */
#layShow :is(.lay-dialog, .layer-cen-neirbox):has(.layer-copyright > p > .lp-footer-company):not(:has(.layer-copyright > .layer-banquan-logo)) {
  padding-bottom: 0 !important;
}

/* The scrollable legacy dialog clips the background at its padded edges. */
#layShow .layer-copyright:has(> p > .lp-footer-company):not(:has(> .layer-banquan-logo)) {
  display: block;
  margin-block-start: 12px;
  padding-block: 28px 24px;
  background-color: #f9fafb;
  border-image: linear-gradient(#f9fafb, #f9fafb) 0 fill / 0 / 0 80px;
}

#layShow .layer-copyright:not(:has(> .layer-banquan-logo)) > p:has(> .lp-footer-company) {
  width: 90%;
  margin: 0 auto;
  color: #90a1b9;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
}

#layShow .layer-copyright:not(:has(> .layer-banquan-logo)) > p:has(> .lp-footer-company) > b {
  font-weight: inherit;
}

#layShow .layer-copyright:not(:has(> .layer-banquan-logo)) > p:has(> .lp-footer-company) > :is(.lp-footer-company + br, br:has(+ b)) {
  display: none;
}

/* Legacy tie-up pages keep a desktop body width at tablet sizes. */
.footer {
  max-width: 100vw;
}

.footer > .block,
.footer > .block > .inner {
  max-width: 100%;
}

@media (max-width: 767px) {
  footer .lp-footer-company--configured {
    padding-inline-end: 0;
  }
}
