:root {
  --footerTextVerticalPadding: 5px;
  --footerGap: 0px;
  --footerTextSize: clamp(12px, 5px + .2vw, 2rem);
}

body {
  --footerHeight: calc((var(--footerTextSize) * 1 * 1.5) + (var(--elementVerticalPadding) * 2) + (var(--footerTextVerticalPadding) * 2));
}

body:has(footer i) {
    --footerHeight: calc((var(--footerTextSize) * 2 * 1.5) + (var(--elementVerticalPadding) * 2) + (var(--footerTextVerticalPadding) * 2));
}

footer {
  background-color: var(--elementBackgroundColorTransparent);
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: var(--elementVerticalPadding) var(--elementHorizontalPadding);
  box-sizing: border-box;
  flex-wrap: wrap;
  min-width: var(--websiteMinWidth);

  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
}

footer p, footer p small {
  padding: var(--footerTextVerticalPadding) 0;
  font-size: var(--footerTextSize);
  color: var(--defaultFontColor);
  line-height: 1;
  box-sizing: border-box;
}

footer:not(:has(a)) {
  justify-content: flex-end;
}

footer .ip {
  display: none;
}

#copyrightAndDisclaimer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

footer:has(i) #copyrightAndDisclaimer {
  display: flex;
  flex-direction: column; 
  gap: var(--footerGap);
  align-items: flex-start;
  width: fit-content;
}

  @media (max-width: 950px) {
    :root {
      --footerGap: 2px;
      --footerVerticalPadding: 15px;
    }

    body {
      --footerHeight: calc((var(--footerTextSize) * 2 * 1.5) + (var(--footerVerticalPadding) * 2) + (var(--footerTextVerticalPadding) * 2) + (var(--footerGap) * 1)) !important;
    }

    body:has(footer .ip) {
      --footerHeight: calc((var(--footerTextSize) * 2 * 1.5) + (var(--footerVerticalPadding) * 3) + (var(--footerTextVerticalPadding) * 2) + (var(--ipFontSize) * 1.5) + (var(--footerGap) * 2)) !important;
    }

    footer {
      flex-direction: column;
      justify-content: center;
      align-items: center;
      overflow-wrap: break-word;
      word-wrap: break-word;
      white-space: normal;
      gap: var(--footerGap);
      padding: var(--footerVerticalPadding) var(--elementHorizontalPadding);
    }

    footer:not(:has(.ip)) {
      padding: var(--footerVerticalPadding) var(--elementHorizontalPadding);
    }

    footer:not(:has(a)) {
      justify-content: center;
    }

    footer .externalLinksList {
      display: none;
    }

    footer .ip {
      display: flex;
      order: 1;
      line-height: 1.5;
      padding: var(--footerTextVerticalPadding) 0;
    }

    footer p {
      text-align: center;
      line-height: 1.5;
    }

    #copyrightAndDisclaimer {
      order: 2;
      gap: var(--footerGap);
      flex-direction: column;
      justify-content: center;
    }

    #copyrightAndDisclaimer p {
      width: 100%;
    }

    .mobileFooterBreak {
      display: block;
    }
  }