@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");
@import url("animations.3e98050633902e83ce14374cb01de3fd.css");
@import url("tooltip.0a15ba5ba7cd497de53b8cb69f0bcb60.css");

.poppins-light {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.poppins-regular {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.poppins-medium {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.poppins-semibold {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.poppins-bold {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.poppins-extrabold {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-style: normal;
}

.poppins-black {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-style: normal;
}

html {
  font-size: 14px;
  min-height: 100vh;
}

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

body {
  font-family: "Poppins", sans-serif;
  background-image: url("../img/default-bg.png");
  background-size: cover;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-size: 1rem;
}

h1 {
  font-family: "Poppins", sans-serif;
  font-size: 2rem; /* 32px */
}

h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem; /* 24px */
}

p {
  font-family: "Poppins", sans-serif;
  font-size: 1rem; /* 16px */
}

small {
  font-family: "Poppins", sans-serif;
  font-size: 0.875rem; /* 14px */
}

a,
span,
div {
  font-family: "Poppins", sans-serif;
}

[hidden] {
  display: none !important;
}

/* We take the Mobile-first CSS approach, where you design and develop your site initially for small mobile devices,
then progressively enhance the design as the screen size increases. It ensures that your website is optimized
for mobile devices by default and then adapts for larger devices using media queries. */

/* Base styles */

/* Loading screen */
.loading-template {
  position: absolute;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ecf0f1;
  gap: 2rem;
  z-index: 999;
  top: 0;
}

.loading-template .loading-template-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  flex-direction: column;
  gap: 2rem;
  color: #1f2937;
  text-align: center;
}

.loading-template .attune__logo {
  height: 2rem;
  width: auto;
  margin-bottom: 2rem;
}
.loading-template .attune__logo img {
  height: 100%;
  width: 100%;
}

/* Error screen */
.error-template-wrapper {
  display: none;
  height: 100vh;
  width: 100vw;
}

.error-template {
  display: flex;
  position: absolute;
  flex-direction: column;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  background: #ecf0f1;
  gap: 2rem;
  z-index: 999;
  top: 0;
}

.error-template .error-template-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  flex-direction: column;
  gap: 2rem;
  color: #1f2937;
  text-align: center;
}

.error-template .error-template-main svg {
  width: 5rem;
  height: auto;
  fill: #c24f6d;
}

.error-template .attune__logo {
  height: 2rem;
  width: auto;
  margin-bottom: 2rem;
}
.error-template .attune__logo img {
  height: 100%;
  width: 100%;
}

.main {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  max-width: 900px;
}

.card {
  gap: 3rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1rem;
  text-align: center;
  border-radius: 1rem;
  background: var(--black-50, rgba(52, 52, 52, 0.6));
  -webkit-backdrop-filter: blur(12px); /* Fixes blur for Safari*/
  backdrop-filter: blur(12px);
}

/* Header */
.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.header__logo {
  display: none;
}
.header__logo img {
  width: 100%;
  height: 100%;
}
.header__title {
  margin-right: auto;
}
.header__title-text {
  text-align: left;
}
.header__location-time {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.header__location {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.header__location-icon {
  width: 0.8rem;
  top: 4px;
  position: relative;
  fill: white;
}
.header__location-text {
  text-align: left;
  line-height: normal;
  letter-spacing: 0.7px;
}
.header__time {
  min-width: fit-content;
}

/* Footer */
.footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer__logo {
  width: 50%;
  text-align: left;
}
.footer__logo img {
  display: block;
  height: auto;
  width: 35%;
}
.footer__attune {
  width: 50%;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 0.5rem;
}
.footer__attune-text {
  font-size: 1rem;
}
.footer__attune-logo {
  height: 1.5rem;
  width: auto;
}

/* Gauges */
.gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.gauge__value {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-direction: column;
  background: #28282878;
  left: 50%;
  top: 53%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

/* Gauge label */
.gauge__text-container {
  display: flex;
  align-items: center;
  justify-content: end;
  flex-direction: column;
  max-width: 75%;
  margin: 0 auto;
}

.gauge__text-container .gauge__text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.gauge__text-container .gauge__text-icon {
  width: 1rem;
  height: auto;
  top: 0.1rem;
  position: relative;
  flex-shrink: 0;
}

/* Main gauge */
.big-gauge-column {
  display: flex;
  flex-direction: column;
  min-width: fit-content;
}
.big-gauge-column .gauge__canvas {
  height: 250px;
  width: 250px;
}
.big-gauge-column .gauge__value {
  height: 190px;
  width: 190px;
}
.big-gauge-column .gauge__value-text {
  font-size: 3rem;
  margin-top: -1rem;
}
.big-gauge-column .gauge__text-label {
  font-size: 1.5rem;
}

/* Separator */
.separator {
  width: 90%;
  margin: 2rem auto;
  border-color: #cacaca;
  border-style: solid;
  border-width: 0 0 2px 0;
}

/* Secondary gagues */
.small-gauge-column {
  width: 100%;
  gap: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.small-gauge-column .gauge__canvas {
  width: 175px;
  height: 175px;
}
.small-gauge-column .gauge__value {
  height: 135px;
  width: 135px;
}
.small-gauge-column .gauge__value-text {
  font-size: 1.5rem;
}
.small-gauge-column .gauge__value-unit {
  font-size: 0.8rem;
}

/* Accessibility */
.gauge[aria-labelledby] {
  outline: none;
}

.gauge:focus {
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Visible focus indicator for focusable gauge text */
.gauge__text:focus {
  outline: 2px solid #0a66c2;
  outline-offset: 2px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .pulsate-fwd { animation: none !important; }
}

/* Animations */
.heartbeat {
  animation: heartbeat 1.5s ease-in-out both;
}
.pulsate-fwd {
  animation: pulsate-fwd 1s ease-in-out alternate;
}

@media (min-width: 575px) {
  .card {
    padding: 1rem 1.5rem;
  }
  .footer__attune-logo {
    height: 1.2rem;
    width: auto;
    position: relative;
    top: -4px;
  }

  /* Secondary gagues */
  .small-gauge-column {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: baseline;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 767px) {
  .big-gauge-column .gauge__canvas {
    height: 350px;
    width: 350px;
  }

  .big-gauge-column .gauge__value {
    height: 270px;
    width: 270px;
  }
  .small-gauge-column .gauge__text-label {
    font-size: 1.2rem;
  }
  .small-gauge-column {
    justify-content: center;
  }
  .gauges__count-4 .small-gauge-column .gauge__container {
    flex-basis: 40%;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 991px) {
  html {
    font-size: 18px;
  }

  .header .header__location-time {
    text-align: right;
  }

  .gauges__count-5 .small-gauge-column .gauge__container,
  .gauges__count-6 .small-gauge-column .gauge__container {
    flex-basis: 30%;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1199px) {
  html {
    font-size: 16px;
  }

  .card {
    padding: 1rem 2rem;
  }
  .header {
    flex-direction: row;
    justify-content: space-between;
  }
  .header__logo {
    display: block;
    text-align: left;
    height: auto;
  }
  .header__logo img {
    width: 5rem;
  }

  .header__location-time {
    display: block;
  }
  .header__title-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-align: center;
    max-width: 22rem;
  }
  .header__location-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 16rem;
    display: inline-block;
  }

  .header__logo,
  .header__location-time {
    flex-grow: 1;
    flex-basis: 0;
  }
  .header__location-time {
    text-align: right;
  }
  .header__location-time .header__location {
    justify-content: end;
  }

  .footer {
    justify-content: end;
  }
  .footer .footer__attune {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: end;
    gap: 0.3rem;
  }
  .footer .footer__logo {
    display: none;
  }

  .main {
    max-width: 1050px;
  }

  /* Gauges */
  .gauges-wrapper {
    display: flex;
    align-items: center;
    padding: 0 2rem;
  }

  .gauges-wrapper.gauges__count-2 {
    width: 80%;
    margin: 0 auto;
  }
  .gauges-wrapper.gauges__count-4 {
    padding: 0;
    width: 90%;
    margin: 0 auto;
  }

  .big-gauge-column {
    border-right: 2px solid #cacaca;
    padding-right: 2rem;
  }
  .big-gauge-column .gauge__canvas {
    height: 300px;
    width: 300px;
  }
  .big-gauge-column .gauge__value {
    height: 230px;
    width: 230px;
  }
  .big-gauge-column .gauge__value-text {
    font-size: 3.5rem;
    margin-top: -1rem;
    line-height: 6rem;
  }
  .big-gauge-column .gauge__value-unit {
    font-size: 1.2rem;
  }
  .big-gauge-column .gauge__text-label,
  .small-gauge-column .gauge__text-label {
    font-size: 1.2rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-align: center;
    max-width: 14rem;
  }

  .small-gauge-column {
    gap: 2rem 0;
  }
  .small-gauge-column .gauge__canvas {
    height: 150px;
    width: 150px;
  }
  .small-gauge-column .gauge__value {
    height: 115px;
    width: 115px;
  }
  .small-gauge-column .gauge__text-label {
    font-size: 1rem;
  }

  .gauges__count-2 .small-gauge-column,
  .gauges__count-3 .small-gauge-column {
    gap: 2rem;
  }

  .gauge__text-label {
    font-size: 1rem;
  }

  .separator {
    display: none;
  }
}

/* Ultrawide monitors and large desktops (1600px to 3839px) */
@media (min-width: 1599px) {
  .main {
    max-width: 1200px;
  }

  .gauges-wrapper {
    padding: 0 1rem;
    gap: 3rem;
    justify-content: center;
    margin: 0 auto;
  }

  .big-gauge-column {
    border-right: 2px solid #cacaca;
    padding-right: 2rem;
  }
  .big-gauge-column .gauge__canvas {
    height: 350px;
    width: 350px;
  }
  .big-gauge-column .gauge__value {
    height: 270px;
    width: 270px;
  }
  .big-gauge-column .gauge__value-text {
    font-size: 3.5rem;
    margin-top: -1rem;
    line-height: 6rem;
  }
  .big-gauge-column .gauge__value-unit {
    font-size: 1.5rem;
  }
  .big-gauge-column .gauge__text-label {
    font-size: 1.5rem;
  }

  .gauges-wrapper.gauges__count-4,
  .gauges-wrapper.gauges__count-6 {
    gap: 0;
  }

  .gauges__count-1 .small-gauge-column,
  .gauges__count-2 .small-gauge-column {
    width: auto;
  }
  .gauges__count-1 .small-gauge-column .gauge__canvas,
  .gauges__count-2 .small-gauge-column .gauge__canvas {
    height: 175px;
    width: 175px;
  }
  .gauges__count-1 .small-gauge-column .gauge__value,
  .gauges__count-2 .small-gauge-column .gauge__value {
    height: 135px;
    width: 135px;
  }

  .gauge__text-label {
    font-size: 1rem;
  }

  .footer__attune {
    gap: 0.5rem;
  }
  .footer__attune-text {
    font-size: 1rem;
  }
}

@media (min-width: 2559px) {
  html {
    font-size: 28px;
  }
  .main {
    max-width: 2000px;
  }
  .header__location-text {
    max-width: 16rem;
  }

  .gauges-wrapper {
    max-width: 90%;
    margin: 2rem auto;
    padding: 0;
  }

  .big-gauge-column .gauge__canvas {
    height: 450px;
    width: 450px;
  }
  .big-gauge-column .gauge__value {
    height: 345px;
    width: 345px;
  }

  .small-gauge-column .gauge__canvas {
    height: 250px;
    width: 250px;
  }
  .small-gauge-column .gauge__value {
    height: 185px;
    width: 185px;
  }
}

/* 4K screens (3840px and up) */
@media (min-width: 3840px) {
  html {
    font-size: 36px;
  }
  .main {
    max-width: 3000px;
  }

  .header__title-text {
    max-width: 32rem;
  }

  .gauges-wrapper.gauges__count-1 {
    gap: 5rem;
  }
  .gauges__count-1 .big-gauge-column {
    padding-right: 5rem;
  }
  .gauges-wrapper.gauges__count-2,
  .gauges-wrapper.gauges__count-4 {
    margin: 2rem auto;
  }
  .gauge__text-container .gauge__text-icon {
    width: 1rem;
  }

  .big-gauge-column .gauge__canvas {
    height: 550px;
    width: 550px;
  }
  .big-gauge-column .gauge__value {
    height: 420px;
    width: 420px;
  }

  .small-gauge-column,
  .gauges__count-4 .small-gauge-column {
    width: auto;
  }
  .small-gauge-column .gauge__canvas,
  .gauges__count-4 .small-gauge-column .gauge__canvas {
    height: 300px;
    width: 300px;
  }
  .small-gauge-column .gauge__value,
  .gauges__count-4 .small-gauge-column .gauge__value {
    height: 230px;
    width: 230px;
  }

  .footer__attune-logo {
    height: 1.5rem;
    width: auto;
    top: -8px;
  }
}

/* 8K screens (7680px and up) */
@media (min-width: 7680px) {
  html {
    font-size: 76px;
  }
  .main {
    max-width: 6000px;
  }

  .big-gauge-column {
    border-right: 6px solid #cacaca;
  }
  .big-gauge-column .gauge__canvas {
    height: 1550px;
    width: 1550px;
  }
  .big-gauge-column .gauge__value {
    height: 1200px;
    width: 1200px;
  }
  .big-gauge-column .gauge__value-text {
    font-size: 5.5rem;
  }

  .small-gauge-column,
  .gauges__count-4 .small-gauge-column {
    width: auto;
  }

  .small-gauge-column .gauge__canvas,
  .gauges__count-4 .small-gauge-column .gauge__canvas {
    height: 700px;
    width: 700px;
  }
  .small-gauge-column .gauge__value,
  .gauges__count-4 .small-gauge-column .gauge__value {
    height: 530px;
    width: 530px;
  }

  .tooltip:after,
  [data-tooltip]:after {
    z-index: 1000;
    padding: 1rem;
    max-width: 27rem;
    background-color: hsl(0deg 0% 9.86% / 90%);
    color: #fff;
    content: attr(data-tooltip);
    font-size: 1rem;
    border-radius: 1rem;
  }

  .tooltip-bottom:after {
    top: 137%;
    bottom: auto;
    left: -50%;
  }
  .tooltip:before,
  [data-tooltip]:before {
    border-width: 0.5rem;
  }
}
