/**
 * Design by fromScratch Studio - 2022, 2023 (fromscratch.io)
 * Implementation in HTML/CSS/JS by Timendus - 2024 (https://github.com/Timendus)
 *
 * See https://github.com/librespeed/speedtest/issues/585
 */

@import url("colors.css");
@import url("fonts.css");
@import url("main.css");
@import url("server-selector.css");
@import url("button.css");
@import url("results.css");
@import url("dialog.css");

/* Setting up the basic structure */

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body {
  min-height: 100vh;
  width: 100vw;
}

html {
  background-color: var(--background-backup-color);
  background-image: url("../images/background.jpeg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  font-size: 10px;

  @media screen and (max-width: 800px) {
    font-size: 8px;
  }
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--background-overlay-color);
  color: var(--primary-text-color);
  display: flex;
  flex-direction: column;
}

/* Position the logo */

header {
  padding: 4rem 7rem;

  @media screen and (max-width: 800px) {
    padding: 7rem 2rem;
    text-align: center;
  }
}

/* Position the source code link */

footer {
  margin: auto auto 0 auto;
  padding: 5rem;

  & > p.source a {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.1rem;
    color: var(--theme-green);
    text-underline-offset: 0.3rem;
    transition: text-underline-offset 0.2s;

    &:hover {
      color: var(--theme-pink);
      text-underline-offset: 0.5rem;
    }
  }

  @media screen and (max-width: 800px) {
    padding: 4rem;
  }
}

/* PRF frontend branding */
header .prf-logo {
    display: block;
    width: min(430px, 75vw);
    max-height: 130px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

header {
    padding-top: 1.5rem;
}

body {
    background-color: #171717 !important;
    background-image: none !important;
}

body::before {
    background-image: none !important;
}

main h1 {
    letter-spacing: 0.01em;
}

.tagline {
    color: #ceb888 !important;
}

a {
    color: #ceb888;
}

/* PRF hide redundant tagline */
.tagline {
    display: none !important;
}

/* PRF exact background */
html,
body,
body::before {
    background-color: #555960 !important;
    background-image: none !important;
}
/* END PRF exact background */

/* PRF Adobe typography */

/* Network Speed Test heading */
main > h1 {
    font-family: "acumin-pro", Arial, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

/* Smaller interface text */
.tagline,
#privacy-warning,
.server-selector,
.ping,
.jitter,
.gauge h2,
.gauge .speed,
footer,
dialog,
.dialog {
    font-family: "source-serif-pro", Georgia, serif !important;
    font-weight: 400;
    font-style: normal;
}

/* END PRF Adobe typography */

/* PRF Purdue theme */

/* Steel background without the dark image overlay. */
html,
body,
body::before {
    background-color: #555960 !important;
    background-image: none !important;
}

/* Acumin Pro for the main heading. */
main > h1 {
    font-family: "acumin-pro", "Franklin Gothic", Arial, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: 0 !important;
}

/* Source Serif Pro for supporting text. */
#privacy-warning,
.server-selector,
.server-selector p,
.server-selector h2,
.ping,
.jitter,
.gauge h2,
.gauge .speed,
footer,
dialog,
.dialog {
    font-family: "source-serif-pro", Georgia, serif !important;
}

/* Purdue-gold links and supporting labels. */
a,
#privacy-warning a,
footer a,
.server-selector p {
    color: #CFB991 !important;
}

/* Dust Start button with black text. */
#start-button {
    color: #000000 !important;
    background: #EBD99F !important;
    box-shadow: 0 0.5rem 1.4rem #00000040 !important;
    margin-bottom: 0 !important;
}

#start-button:hover {
    color: #000000 !important;
    background: #CFB991 !important;
}

/* Rush gold Abort button while the test is active. */
#start-button.running {
    color: #000000 !important;
    background: #DAAA00 !important;
}

/*
 * Reduce the large gap before "You are connected through."
 * The server selector remains available to LibreSpeed JavaScript.
 */
.server-selector {
    margin-top: 0.75rem !important;
    margin-bottom: 1rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

.server-selector .chosen {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.server-selector p,
.server-selector h2 {
    margin-top: 0.15rem !important;
    margin-bottom: 0.15rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Boilermaker Gold for download. */
.download .progress {
    border-color: #CFB991 !important;
}

/* Rush Gold for upload. */
.upload .progress {
    border-color: #DAAA00 !important;
}

/* Steam and white provide readable supporting text on Steel. */
.gauge h2,
.gauge .speed,
.ping,
.jitter {
    color: #FFFFFF !important;
}

/* Keep the Privacy Policy notice close to the Start button. */
#privacy-warning {
    margin-top: 0.6rem !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.3 !important;
}

/* END PRF Purdue theme */
