html {
  min-height: 100%;
}

html body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body > footer {
  margin-top: auto;
}

body footer {
  padding: 26px 0;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

body footer > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

body footer .footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, auto) 1fr;
  align-items: center;
  gap: 24px;
}

body footer .footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
}

body footer .footer-copy {
  margin: 0;
  color: var(--gray-600);
  font-size: 13px;
  line-height: 1.5;
}

body footer .footer-icp {
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
}

body footer .footer-icp:hover {
  color: var(--orange);
}

body footer .footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

body footer .footer-links a {
  color: var(--gray-600);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

body footer .footer-links a + a {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--gray-200);
}

body footer .footer-links a:hover {
  color: var(--orange);
}

body footer .footer-switches {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
}

body footer .footer-switch {
  position: relative;
  display: block;
  color: var(--gray-600);
  font-size: 13px;
  white-space: nowrap;
}

body footer .footer-switch summary {
  display: flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
  color: var(--gray-800);
  font-weight: 400;
  transition: color 0.2s;
}

body footer .footer-switch summary::-webkit-details-marker {
  display: none;
}

body footer .footer-switch summary:hover,
body footer .footer-switch summary:focus-visible {
  color: var(--orange);
}

body footer .footer-switch summary:focus-visible {
  outline: 2px solid rgba(180, 90, 15, 0.35);
  outline-offset: 4px;
  border-radius: 2px;
}

body footer .footer-switch-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 10;
  min-width: 104px;
  padding: 6px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
}

body footer .footer-switch-menu a {
  display: block;
  padding: 7px 9px;
  border-radius: 5px;
  color: var(--gray-800);
  text-decoration: none;
}

body footer .footer-switch-menu a:hover {
  color: var(--orange);
  background: var(--orange-bg);
}

@media (max-width: 900px) {
  body footer > .container,
  body footer .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
  }

  body footer .footer-legal,
  body footer .footer-links,
  body footer .footer-switches {
    justify-content: center;
  }
}
