@import url(./styles/reset.css);
@import url(./styles/fonts.css);
@import url(./styles/helpers.css);
@import url(./styles/animations.css);
@import url(./styles/palette.css);
@import url(./styles/inputs.css);
@import url(./styles/contact-form.css);
@import url(./styles/buton.css);
@import url(./styles/app-preview.css);

:root {
  --max-width: 1200px;
  --accent-color: #2196f3;

  --inactive-color: var(--dark);
  --bg-secondary: #ffebd6;

  --color-primary: var(--accent-color);
  --bg-primary: hsla(from var(--color-primary) h s l / 0.3);

  --splash-mob-frame-color: #019ce1;
  --splash-mob-frame-color: var(--color-primary);
  --splash-mob-frame-color: hsl(from var(--color-primary) calc(h + 150) s l);

  --input-color: hsl(from var(--accent-color) h s calc(l * 1.5) / 1);
  --hr-color: var(--bg-primary);
}

html {
  min-width: 320px;
}

body {
  flex: 1;
  max-width: var(--max-width);
  box-sizing: border-box;
  container: auto;

  @media screen {
    padding: 0 40px;
  }
}

.beta:after {
  content: "βeta";
  color: red;
  font-size: 15px;
  padding: 3px;
}

header {
  /* // */
  background-color: none;
}

h2 {
  text-transform: capitalize;
}

nav.menu {
  list-style: none;

  padding: 0;
  margin: 0;

  a {
    display: flex;

    text-transform: capitalize;
    text-decoration: none;

    color: var(--inactive-color);

    &.selected {
      border-bottom: 3px solid var(--accent-color);
      color: var(--accent-color);
    }
  }
}

section {
  box-sizing: border-box;

  margin: 20px 0;
}

.bg-secondary {
  background-color: var(--bg-secondary);
}

.button-with-icon {
  display: flex;
  flex-direction: row;
  align-items: center;

  font-weight: bold;
  text-transform: uppercase;

  padding: 0 10px;

  .icon-emoji {
    font-size: 30px;
  }

  .button-text {
  }
}

.section-splash {
  overflow: hidden;

  /* todo: can change hue, keep opacity */
  background-color: var(--bg-primary);
}

/* STATS */

.stats-total {
  padding: 20px;
  container-type: inline-size;

  .stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;

    .stat-value {
      font-size: min(6cqw, 40px);
      font-weight: bold;
    }

    .stat-text {
      font-size: min(3cqw, 20px);
    }
  }
}

.stats-section {
  padding: 20px;

  border: 2px solid;
  border-color: var(--bg-primary);

  h3 {
    text-transform: capitalize;
    margin-left: 80px;
  }

  .stats-columns {
    overflow-x: auto;
  }
}

/* results */
.is-loading {
  animation: fadeIn 500ms infinite alternate;
}

.result-item {
  padding: 10px;
  height: 40px;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background-color 150ms;

  &[href]:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }

  .item-value {
    font-size: 30px;
    width: 60px;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
  }

  .item-country {
    padding: 0 5px;
    font-size: 40px;
    margin: 0 5px;

    line-height: 30px;
    display: flex;
    align-items: center;
  }

  .item-text-block {
    display: flex;
    justify-content: center;

    width: 180px;

    .item-name {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .item-date {
      color: darkgray;
    }
  }
}

/* FOOTER */

.footer-logo {
  container-type: inline-size;
  width: 100%;

  .footer-logo-text {
    @container (width < 150px) {
      display: none;
    }
  }
}

hr {
  padding: 0;
  margin: 0;
  /* width: 100%; */
  border-width: 1px;
  border-style: dashed;
  box-sizing: border-box;
  align-self: stretch;
  border-color: var(--hr-color);
}

dl.faq-list {
  dt {
    /* question */
    padding-top: 1rem;
    padding-bottom: 1rem;

    font-weight: bold;
    font-size: 18px;
  }

  dd {
    /* answer */
    margin: 0;
    font-size: 16px;
    padding-bottom: 1rem;
  }
}

h1 {
  margin: 0;
}

/* landscape */

.splash-text-container {
  container-type: inline-size;
  box-sizing: border-box;

  .splash-text-block {
    font-size: 10cqw;
    font-weight: bold;
    padding: 4cqw 8cqw;
  }

  .button-link {
    font-size: 7cqw;
  }
}

.popup-menu {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;

  background: white;
  border: 2px solid var(--color-primary);
  border-radius: 5px;
  padding: 10px 0;
  margin: 45px 0px;
}

.nav-lang-item-list {
  > * {
    border-radius: 0;

    &:hover {
      background-color: var(--bg-secondary);
    }
  }
}

.logo-frame-discord {
  border-radius: 30px;
  background-color: #737cf9;
  box-shadow:
    inset 0px -1px 1px 0px #27084bbf,
    inset 0px 2px 1px 0px #b9beff,
    0px 2px 2px 0px #27084bbf;

  padding: 20px;
  img {
    filter: invert(1) drop-shadow(0px 4px 3px rgb(60, 47, 132));
  }
}

.mobile-menu-overlay {
  background-color: hsla(from var(--bg-secondary) h s l / 0.3);
}

@media (width >= 600px) {
  .mobile-only {
    display: none;
  }
}

@media (orientation: portrait) and (width < 600px) {
  body {
    padding: 10px;
  }

  .desktop-only {
    display: none;
  }

  .section-splash {
    flex-direction: column;
  }

  .mobile-center {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  button#\$btnLangClose {
    position: fixed;
    right: 0;
    top: 0;
    margin: 10px;
  }

  .popup-menu {
    position: fixed;
    left: 0;
    bottom: 0;

    margin: 0px;
    border: none;
  }
}
