/* AMP storefront footer — compact, equal columns.
   Deliberately excludes review-card footers, cart footers and admin pages.
   This stylesheet must be loaded after the existing storefront styles. */
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) > div {
  padding-top: 28px !important;
}
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) > div > div:first-child {
  gap: 20px !important;
  padding-bottom: 14px !important;
  align-items: start;
}
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row;
  align-items: start !important;
  align-content: start !important;
  gap: 12px 18px !important;
  min-width: 0 !important;
  width: 100%;
}
/* Old flex percentage caps also applied to grid children, leaving most of
   each column unused. Remove those caps instead of shrinking the text. */
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div {
  min-width: 0 !important;
  max-width: none !important;
  width: 100% !important;
  flex: initial !important;
  align-self: start;
  margin: 0 !important;
  padding: 0 !important;
}
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div > h3 {
  margin: 0 0 5px !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
  letter-spacing: .025em !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div > ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div > ul > li {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div > ul > li > a {
  display: block !important;
  margin: 0 !important;
  padding: 2px 0 !important;
  min-height: 20px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
/* Research Tools is the third section row. Its links use the same three
   column boundaries as the two rows above, in their original reading order. */
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div:last-child {
  grid-column: 1 / -1;
  border-top: 1px solid #dce6f3;
  padding-top: 10px !important;
}
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div:last-child > ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 18px !important;
  row-gap: 0 !important;
  align-items: start;
}
/* Tighten the end of the footer without taking away the bottom-nav space. */
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) > div > div:last-child {
  gap: 10px !important;
  padding-top: 12px !important;
}
:is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 3px;
}
@media (max-width: 1023px) {
  :is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) > div > div:first-child {
    align-items: stretch;
    gap: 16px !important;
  }
}
@media (max-width: 600px) {
  :is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) > div {
    padding-inline: 16px !important;
    padding-top: 24px !important;
  }
  :is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap {
    gap: 10px 10px !important;
  }
  :is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div > h3 {
    font-size: 9px !important;
    margin-bottom: 4px !important;
    letter-spacing: .015em !important;
  }
  :is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div > ul > li > a {
    font-size: 11.5px !important;
    line-height: 1.4 !important;
    padding-block: 2px !important;
  }
  :is(body, .amp-unified-site) :is(footer.bg-amp-surface, footer.amp-premium-footer) .flex-1.flex.flex-wrap > div:last-child > ul {
    column-gap: 10px !important;
  }
}
