@import 'variables.css';

body {
  margin: 0;
  font-family: Verdana, sans-serif;
  background-color: var(--color-body-background);
  color: var(--color-body-text);
}

header {
  padding: 0 20px;
  height: 64px;
  line-height: 64px;
  background-color: var(--color-box-background);
}

main {
  display: flex;
  box-sizing: border-box;
  padding: 20px 20px 120px;
  width: 100%;
}

section {
  flex: 1 0 auto;
}

section > div {
  margin-right: 20px;
}

aside {
  flex: 0 0 400px;
}

aside > div {
  margin-left: 20px;
}

h1 {
  margin: 0;
  padding-left: 80px;
  background-image: url('../images/icon.svg');
  background-repeat: no-repeat;
  background-size: 54px auto;
  background-position: 0 6px;
}

h2 {
  font-size: 20px;
}

h2:first-child {
  margin-top: 0;
}

a {
  color: var(--color-accent-link);
  text-decoration: none;
  transition: color ease 250ms;
}

a:not(.button):hover {
  color: var(--color-accent-link-hover);
}

.grey-bg {
  box-sizing: border-box;
  padding: 20px;
  background-color: var(--color-box-background);
}

.hidden {
  display: none;
}

.button {
  display: block;
  box-sizing: border-box;
  padding: 10px;
  border: none;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 700;
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
  text-align: center;
  cursor: pointer;
  transition: background ease 500ms;
}

.button:hover {
  background-color: var(--color-accent-link-hover);
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 20px;
  height: 64px;
  line-height: 64px;
  font-size: 14px;
  background-color: var(--color-box-background);
}

footer a {
  display: block;
  padding-left: 40px;
  background-image: url('../images/sh-at.png');
  background-repeat: no-repeat;
  background-size: 32px 32px;
  background-position: center left;
  color: var(--color-body-text);
}

.info-icon {
  position: relative;
  margin-bottom: 15px;
  padding-left: 30px;
  color: var(--color-label);
}

.info-icon::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 0;
  width: 18px;
  height: 18px;
  background-image: url('../images/info.svg');
  background-size: 18px 18px;
}

@media screen and (min-width: 900px) {
  section > div {
    width: calc(100vw - 460px);
  }
}

@media screen and (max-width: 899px) {
  main {
    display: block;
  }

  section > div {
    margin: 0;
  }

  aside > div {
    margin: 20px 0;
  }
}

@media screen and (max-width: 619px) {
  h1 {
    font-size: 20px;
  }
}

@media screen and (max-width: 479px) {
  h1, footer a {
    padding-left: 0;
    background-image: none;
  }

  footer {
    box-sizing: border-box;
    padding-top: 14px;
    line-height: normal;
  }
}

@media screen and (max-width: 344px) {
  h1 {
    font-size: 18px;
  }
}
