/* This file contains all base styling and CSS variables */

@font-face {
  font-family: "Segoe";
  font-style: normal;
  font-weight: 400;
  src: local("Segoe"), url("/fonts/segoe.woff") format("woff");
}

@font-face {
  font-family: "Segoe Light";
  font-style: normal;
  font-weight: 300;
  src: local("Segoe"), url("/fonts/segoe-light.woff") format("woff");
}

@font-face {
  font-family: "Segoe UI";
  font-style: normal;
  font-weight: 400;
  src: local("Segoe"), url("/fonts/segoe-ui.woff") format("woff");
}

@font-face {
  font-family: "Segoe Condensed";
  font-style: normal;
  font-weight: 400;
  src: local("Segoe Condensed"), url("/fonts/segoe-condensed.woff") format("woff");
}

@font-face {
  font-family: "Segoe Condensed";
  font-style: normal;
  font-weight: 700;
  src: local("Segoe Condensed"), url("/fonts/segoe-condensed-bold.woff") format("woff");
}

:root {
  --accent: #61b6e6;
  --background: #1f2937;
  --background-color: rgb(246, 249, 252);
  --white: #ededed;
  --green: rgb(0, 209, 0);
  --font-body:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  --transition: all ease 0.2s;
  --box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

body {
  font-family:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  color: #1f2937;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: underline;
  padding: 0.1rem;
  border-radius: 0.25rem;
  color: var(--background);
  transition: var(--transition);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: bold;
  color: #1f2937;
}

h1 {
  padding: 0.5rem;
}

a:visited {
  color: #800080;
}

/* Add a 'external link' svg to all links that are external */
.link-with-external-indicator[href^="http"]:not(
    [href*="cornucopia-mvp.vercel.app"]
  ):not([href*="localhost"]):after {
  content: "";
  display: inline-block;
  margin-left: 0.2em;
  width: 1rem;
  height: 1rem;
  -webkit-mask: url("/icons/external-link.svg") no-repeat 50% 50%;
  mask: url("/icons/external-link.svg") no-repeat 50% 50%;
  -webkit-mask-size: cover;
  mask-size: cover;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: currentColor;
}

.display-s {
  display: contents;
}

.how-to-play {
  width: min(59vw, 100%);
  height: auto;
  aspect-ratio: 16/9;
}

.error-container {
  width: 90%;
  margin: auto;
  padding: 0rem;
  display: flex;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin-top: 4rem;
}

.error-text {
  outline: 1px rgb(231, 231, 231) solid;
  height: 100%;
  min-height: auto;
  width: calc(50% - 4rem);
  opacity: 80%;
  border-radius: 1rem;
  background-color: rgb(255, 255, 255);
  padding: 1rem 2rem 1rem 1rem;
  box-shadow: var(--box-shadow);
}

.error-text.desktop-left {
  padding: 1rem 1rem 1rem 2rem;
}

.error-image {
  width: 50%;
  text-align: center;
}

.error.desktop-left {
  flex-direction: row;
}

.hide {
  display: none;
}

@media (max-width: 768px) {
  .error-container {
    flex-direction: column;
  }

  .error-image {
    width: 90%;
    padding: 0;
    margin: auto;
  }

  .error-text {
    padding: 1rem;
    height: 100%;
    width: calc(100% - 2rem);
  }
}

/* Skip to main content link for keyboard and screen reader users */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  background: var(--background);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  font-weight: bold;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  color: #ffffff !important;
  background: #1f2937 !important;
  outline: 3px solid #ffffff;
}
