@import '../config/import';

body {
  background: var(--body-bg);
  color: var(--body-color);
  font-family: var(--ff-sans-serif);
  padding: 0;
  margin: 0;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  &.hidden-shell {
    padding-top: 0 !important;

    .crayons-header,
    .crayons-footer {
      display: none;
    }
    .hidden-shell-innerhidden {
      display: none;
    }
  }

  &.user-tags-followed-0,
  &.user-tags-followed-1,
  &.user-tags-followed-2 {
    #sidebar-nav-followed-tags {
      height: 90px;
    }
  }
  &.user-tags-followed-3,
  &.user-tags-followed-4,
  &.user-tags-followed-5 {
    #sidebar-nav-followed-tags {
      height: 205px;
    }
  }
  &.user-tags-followed-max {
    #sidebar-nav-followed-tags {
      height: 42vh;
    }
  }

  &.default-header {
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
  }

  #main-content {
    scroll-margin-top: var(--header-height);
  }
}

.wrapper {
  flex: 1 auto;
  visibility: visible;
  font-size: 18px;
}

a {
  color: var(--link-branded-color);
  text-decoration: none;
}

// Logo
.site-logo {
  max-width: var(--max-width, 125px);
  font-size: var(--font-size, var(--fs-base));
  font-weight: var(--font-weight, var(--fw-medium));

  display: inline-flex;
  flex-shrink: 0;
  align-self: center;
  align-items: center;
  vertical-align: middle;
  color: var(--base-100);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1;
  outline: 0;

  // overflow-wrap: anywhere isn't supported in Safari, in which case this fallback applies
  overflow-wrap: break-word;
  overflow-wrap: anywhere;

  &__img,
  svg {
    max-width: 100%;
    width: auto;
    height: calc(
      var(--header-height) - var(--su-2) * 2
    ); // making calculations instead of setting fixed value so should be smooth change if we ever decide to change header's height.
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    outline: 0;
  }

  @media (min-width: $breakpoint-s) {
    --max-width: 150px;
  }

  @media (min-width: $breakpoint-m) {
    --max-width: 175px;
    --font-size: var(--fs-l);
    --font-weight: var(--fw-bold);
  }

  @media (min-width: $breakpoint-l) {
    --max-width: 200px;
    --font-size: var(--fs-xl);
  }

  &:hover,
  .js-focus-visible &.focus-visible:focus {
    color: var(--base-80);
    text-decoration: underline;
  }

  .js-focus-visible &.focus-visible:focus {
    box-shadow: var(--focus-ring);
  }
}
