/*
 * The site footer (Views/Shared/_SiteFooter.cshtml) in the new site's design: web-apps packages/ui SiteFooter,
 * with its Tailwind classes written out. The dark warm surface is the design's in both themes; legacy is light
 * only, so there is no dark variant. Selectors start at footer.abj-site-footer to outweigh the bundle's bare
 * "footer" rules (beige background, inset shadow, 11.2px type, inline-block list items).
 */

footer.abj-site-footer {
  clear: both;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #0f0d0c;
  box-shadow: none;
  color: #beb8b4;
  font-family: "Noto Kufi Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4286;
  direction: rtl;
  text-align: start;
}

footer.abj-site-footer::before,
footer.abj-site-footer::after {
  display: none;
}

footer.abj-site-footer *,
footer.abj-site-footer *::before,
footer.abj-site-footer *::after {
  box-sizing: border-box;
}

footer.abj-site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

footer.abj-site-footer li {
  display: block;
  margin: 0;
  padding: 0;
}

footer.abj-site-footer h3,
footer.abj-site-footer h6,
footer.abj-site-footer p {
  margin: 0;
  padding: 0;
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
}

footer.abj-site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

footer.abj-site-footer a:hover {
  color: #e96a2c;
  text-decoration: none;
}

footer.abj-site-footer a:focus-visible {
  outline: 2px solid #f68046;
  outline-offset: 2px;
}

.abj-site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 16px;
}

.abj-site-footer__grid {
  display: grid;
  gap: 40px;
}

/* First in the source for the heading order, last on screen. */
.abj-site-footer__stores {
  order: 1;
  container-type: inline-size;
}

footer.abj-site-footer .abj-site-footer__label {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4286;
}

.abj-site-footer__store-list {
  display: grid;
  gap: 8px;
  margin-top: 16px !important;
}

/* Phones: three equal buttons across where three fit, otherwise three full-width rows, never 2 + 1. */
@container (min-width: 21rem) {
  .abj-site-footer__store-set--compact .abj-site-footer__store-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

footer.abj-site-footer li:has(> .abj-site-footer__store) {
  min-width: 0;
}

/* The stores' own badges: black with the grey keyline and white type their guidelines specify, read left to
   right (logo, then wording) as the official artwork does. */
footer.abj-site-footer a.abj-site-footer__store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #a6a6a6;
  border-radius: 8px;
  background: #000;
  color: #fff;
  text-align: left;
}

footer.abj-site-footer a.abj-site-footer__store:hover {
  background: #1f1f1f;
  color: #fff;
}

.abj-site-footer__logo {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* The badges' wording is the stores' English; the Arabic UI face sets Latin wide enough to cut "Google Play". */
.abj-site-footer__store-text {
  display: flex;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.abj-site-footer__eyebrow {
  display: none;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.abj-site-footer__store-name {
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.abj-site-footer__store-set--wide {
  display: none;
}

footer.abj-site-footer .abj-site-footer__title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.abj-site-footer__description {
  max-width: 36rem;
  margin-top: 12px !important;
  font-size: 14px;
  line-height: 1.625;
}

.abj-site-footer__social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px !important;
}

footer.abj-site-footer .abj-site-footer__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  color: #beb8b4;
}

footer.abj-site-footer .abj-site-footer__social a:hover {
  background: rgb(255 255 255 / 0.1);
}

footer.abj-site-footer .abj-site-footer__social .fb a:hover,
footer.abj-site-footer .abj-site-footer__social .fb a:focus-visible {
  color: #1877f2;
}

footer.abj-site-footer .abj-site-footer__social .tw a:hover,
footer.abj-site-footer .abj-site-footer__social .tw a:focus-visible {
  color: #fff;
}

footer.abj-site-footer .abj-site-footer__social .is a:hover,
footer.abj-site-footer .abj-site-footer__social .is a:focus-visible {
  color: #e4405f;
}

.abj-site-footer__social svg {
  width: 20px;
  height: 20px;
}

.abj-site-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

footer.abj-site-footer .abj-site-footer__links h3 {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4286;
}

.abj-site-footer__links--wide {
  display: none;
}

.abj-site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 13px;
  line-height: 1.3333;
}

.abj-site-footer__bottom p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

@media (min-width: 640px) {
  .abj-site-footer__inner {
    padding-inline: 24px;
  }

  .abj-site-footer__store-set--compact,
  .abj-site-footer__links--compact {
    display: none;
  }

  .abj-site-footer__store-set--wide {
    display: block;
  }

  .abj-site-footer__links--wide {
    display: grid;
  }

  .abj-site-footer__store-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  footer.abj-site-footer a.abj-site-footer__store {
    width: auto;
    min-width: 160px;
    justify-content: flex-start;
    gap: 8px;
    padding-inline: 12px;
  }

  .abj-site-footer__logo {
    width: 24px;
    height: 24px;
  }

  .abj-site-footer__eyebrow {
    display: block;
  }

  .abj-site-footer__store-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
  }

  .abj-site-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .abj-site-footer__inner {
    padding: 64px 32px;
  }

  .abj-site-footer__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .abj-site-footer__store-list {
    flex-direction: column;
    align-items: flex-start;
  }

  footer.abj-site-footer .abj-site-footer__title {
    font-size: 20px;
    line-height: 1.4;
  }

  .abj-site-footer__links {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  footer.abj-site-footer a {
    transition: none;
  }
}
