.site-footer {
  position: relative;
  background-color: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: var(--footer-padding-block) 0;
  margin-top: auto;
  overflow: visible;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--footer-overlay-gradient);
  z-index: 0;
}

.footer-layout {
  position: relative;
  z-index: 1;
  max-width: var(--footer-max-width);
  margin: 0 auto;
  padding: 0 var(--footer-horizontal-padding);
  overflow: visible;
}

.footer-top-row,
.footer-theme-row {
  margin-bottom: var(--footer-section-gap);
  padding-bottom: var(--footer-section-divider-spacing);
  border-bottom: 1px solid var(--footer-border);
}

.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  position: relative;
}

.footer-brand-stack {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.footer-brand-image {
  height: var(--footer-logo-height);
  width: auto;
  display: block;
}

.footer-brand-overlay {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--header-overlay-fill);
  opacity: var(--header-overlay-opacity);
  pointer-events: none;
  -webkit-mask-image: var(--header-overlay-mask);
  -webkit-mask-position: center;
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-image: var(--header-overlay-mask);
  mask-position: center;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

.footer-brand-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-links {
  display: flex;
  gap: var(--footer-link-gap);
}

.footer-nav-link {
  font-weight: 500;
  position: relative;
  font-family: "Open Sans", sans-serif;
}

.footer-theme-row {
  display: flex;
  justify-content: center;
  overflow: visible;
}

.footer-theme-switcher,
.footer-theme-controls {
  display: flex;
  align-items: center;
  gap: 0;
}

.footer-theme-controls {
  --footer-theme-control-height-current: var(--footer-theme-control-height);
}

.footer-theme-picker {
  position: relative;
  width: fit-content;
  min-width: max-content;
  z-index: 200;
  isolation: isolate;
}

.footer-theme-selected {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--footer-theme-control-height-current);
  padding: 0 1rem;
  box-sizing: border-box;
  color: white;
  cursor: pointer;
  white-space: nowrap;
  border-radius: var(--rad) 0 0 var(--rad);
  transition:
    background-color var(--smooth-duration) var(--smooth-ease),
    border-color var(--smooth-duration) var(--smooth-ease),
    box-shadow var(--smooth-duration) var(--smooth-ease),
    transform var(--smooth-duration) var(--smooth-ease);
}

.footer-theme-selected:hover {
  background-color: var(--surface-control-bg-hover);
  border-color: var(--prim);
}

.footer-theme-selected.is-nav-glow {
  box-shadow: var(--footer-theme-highlight-shadow);
}

.footer-theme-selected.is-nav-glow-out {
  animation: footer-theme-glow-out 420ms ease forwards;
}

.footer-theme-selected i {
  transition: transform var(--smooth-duration) var(--smooth-ease);
}

.footer-theme-picker.is-active .footer-theme-selected i {
  transform: rotate(180deg);
}

@keyframes footer-theme-glow-out {
  0% {
    box-shadow: var(--footer-theme-highlight-shadow);
    transform: translateY(0);
  }

  100% {
    box-shadow:
      0 0 0 1px rgba(var(--prim-rgb), 0),
      0 0 0 rgba(var(--prim-rgb), 0),
      0 0 0 rgba(var(--prim-rgb), 0);
    transform: translateY(0);
  }
}

.footer-theme-swatch {
  width: var(--footer-theme-swatch-size);
  height: var(--footer-theme-swatch-size);
  border-radius: 50%;
  border: 2px solid var(--footer-theme-swatch-border);
  background-color: var(--footer-theme-swatch-default);
  transition: background-color var(--smooth-duration) var(--smooth-ease);
}

.footer-theme-menu {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  width: max-content;
  min-width: 100%;
  z-index: 210;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 0;
  opacity: 0;
  transition: max-height var(--smooth-duration) var(--smooth-ease), opacity var(--smooth-duration) var(--smooth-ease);
  box-shadow: var(--footer-theme-menu-shadow);
}

.footer-theme-picker.is-active .footer-theme-menu {
  max-height: min(24rem, 68vh);
  opacity: 1;
}

.footer-theme-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all var(--smooth-duration) var(--smooth-ease);
}

.footer-theme-option:hover {
  background-color: var(--footer-theme-option-hover-background);
}

.footer-theme-option.is-selected {
  background-color: var(--footer-theme-option-selected-background);
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-copyright,
.footer-credits {
  font-size: var(--footer-meta-text-size);
  color: var(--footer-muted);
}

.footer-credits {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
}

.footer-heart-icon {
  width: var(--footer-heart-size);
  height: var(--footer-heart-size);
  display: inline-block;
  flex: 0 0 auto;
  background: var(--footer-heart-fill);
  opacity: var(--header-overlay-opacity);
  -webkit-mask-image: var(--footer-heart-mask);
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-image: var(--footer-heart-mask);
  mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
}

.footer-credit-name {
  color: var(--footer-credit-color);
  font-weight: 600;
}

.footer-status-list {
  display: grid;
  width: max-content;
  justify-items: stretch;
  gap: var(--footer-status-gap);
}

.footer-status-item {
  display: grid;
  grid-template-columns: var(--footer-status-dot-size) max-content;
  align-items: center;
  column-gap: 0.65rem;
  width: 100%;
  color: var(--footer-text);
}

.footer-status-dot {
  width: var(--footer-status-dot-size);
  height: var(--footer-status-dot-size);
  border-radius: 50%;
  flex: 0 0 auto;
}

.footer-status-dot.is-muted {
  background: var(--footer-status-muted-color);
}

.footer-status-dot.is-live {
  background: var(--footer-status-live-color);
}

.footer-status-text {
  font-size: var(--footer-meta-text-size);
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--footer-muted);
}

@media (max-width: 768px) {
  .footer-top-row {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-bottom-row {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-meta {
    order: 2;
  }

  .footer-status-list {
    order: 1;
    width: auto;
    justify-items: center;
    text-align: center;
  }

  .footer-status-item {
    width: auto;
  }

  .footer-theme-controls {
    --footer-theme-control-height-current: var(--footer-theme-control-height-mobile);
  }

  .footer-brand-image {
    height: var(--footer-logo-height-mobile);
  }
}
