@use './vars';
@use './fonts';
@use './font-sizes';
@use './reset';
@use './viewport-classes';
@use './vars.module' as v;
@use './mixins/viewport-sizes' as vs;
@use './hljs';
@use './notifier';
@use './page-content';

html {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Nunito Sans', sans;
}

#app {
  height: 100%;
  width: 100%;
}

main {
  --main-padding-bottom: 100px;

  padding-top: var(--main-padding-top);
  padding-bottom: var(--main-padding-bottom);

  @include vs.tablet {
    --main-padding-bottom: 80px;
  }
  @include vs.mobile {
    --main-padding-bottom: 60px;
  }
  @include vs.mobile-small {
    --main-padding-bottom: 40px;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  display: block;
  font-family: Quicksand, serif;
}

h2,
h3,
h4 {
  margin-bottom: 14px;
}

.content-frame {
  --frame-padding: 60px;

  margin-left: auto;
  margin-right: auto;
  max-width: v.$content-size;
  padding-left: var(--frame-padding);
  padding-right: var(--frame-padding);
  position: relative;

  @include vs.tablet {
    --frame-padding: 40px;
  }
  @include vs.mobile {
    --frame-padding: 20px;
  }
  @include vs.mobile-small {
    --frame-padding: 10px;
  }
}

svg {
  display: block;
}

.hidden {
  display: none;
}

.two-panel-layout {
  display: flex;

  > .content {
    flex-grow: 1;
  }
}

// all monospace elements
code,
pre,
tt,
kbd,
samp {
  font-family: 'Noto Sans Mono', monospace;
}

p {
  margin-top: 12px;
}

a {
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;

  &.always-underlined {
    // no idea why these need to be repeated.  Feels like a bug in ff
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-line: underline;
  }
}

.screen-reader-only {
  position: absolute;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.invisible {
  opacity: 0;
}

dl {
  display: grid;
  grid-gap: 4px 16px;
  grid-template-columns: max-content;
}
dt {
  font-weight: bold;
}
dd {
  margin: 0;
  grid-column-start: 2;
}

.note {
  font-style: italic;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
}
