@import url("reset-min.css");

:root {
  --hue: 175; /* Aspit default: 175 */
  --saturation-value: 47; /* Aspit default: 47 */

  /* Color calculations */
  --saturation: calc(var(--saturation-value) * 1%);
  --aspit-night-green: hsl(var(--hue), var(--saturation), 12%);
  --aspit-darkest-green: hsl(var(--hue), var(--saturation), 15%);

  /* Additional colors */
  --aspit-red: hsl(5, 100%, 64%);
  --aspit-white: hsl(0, 0%, 100%);

  /* Spacing between content */
  --gutter: 1;
  --gutter-small: calc(var(--gutter) * 1rem);
  --gutter-large: calc(var(--gutter) * 2rem);

  --line-height: 1.5;
}

/* ////////////////////// BASE STYLES /////////////////////// */

body {
  background-color: var(--aspit-darkest-green);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--aspit-white);
  line-height: var(--line-height);
  font-size: 0.9rem;
}

img {
  max-width: 100%;
  display: block;
}

/* ////////////////////// PAGE LAYOUT /////////////////// */

.page-wrapper {
  min-height: 100vh;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 4rem 1fr; /* page header and page content element */
}

.page-header {
  height: 3rem;
  position: relative;
  background-color: var(--aspit-night-green);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: var(--aspit-white);
  padding: 0 var(--gutter-small);
}

.page-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter-small);
  padding: var(--gutter-small);
  padding-top: var(--gutter-large);
  box-sizing: border-box;
}

.page-column-group {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  gap: var(--gutter-small);
}

.page-column {
  display: grid;
  gap: var(--gutter-small);
}

/* /////////////// SITE LOGO AND TITLE /////////////////// */

.site-title {
  display: grid;
  grid-template-columns: auto;
  column-gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: bold;
}

.site-title:last-of-type {
  text-align: right;
}
.site-title:last-of-type > time:first-child {
  display: none;
}

.site-title time::first-letter {
  text-transform: capitalize;
}

.site-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem;
  background-color: var(--aspit-night-green);
  transition: width 0.3s, height 0.3s;
}

.white-fill {
  fill: var(--aspit-white);
}

.red-fill {
  fill: var(--aspit-red);
}

.site-logo .aspit-dot {
  animation: bounce 0.5s ease-out alternate infinite;
}

@keyframes bounce {
  to {
    transform: translateY(-7%);
  }
}

.site-logo svg {
  width: 100%;
  height: 100%;
}

/* ////////////////////// SCROLLBAR STYLING ///////////////////////// */

::-webkit-scrollbar {
  width: 0; /* Width of the scrollbar */
}

/* Define scrollbar track */
::-webkit-scrollbar-track {
  background: #f1f1f1; /* Background color of the track */
}

/* Define scrollbar thumb */
::-webkit-scrollbar-thumb {
  background: var(--aspit-red); /* Color of the thumb */
}

/* Define scrollbar corner */
::-webkit-scrollbar-corner {
  background: transparent; /* Background color of the scrollbar corner */
}

/* Define scrollbar button */
::-webkit-scrollbar-button {
  background: #ccc; /* Background color of the scrollbar buttons */
}

/* /////////////// ADDONS /////////////////// */

.striped-list li:nth-child(even) {
  background-color: hsla(360, 100%, 100%, 0.15);
}

@keyframes pulse {
  to {
    transform: scale(105%);
  }
}

.pulse {
  animation: pulse 0.4s infinite alternate;
}

@keyframes pulse-more {
  to {
    transform: scale(120%);
  }
}

.pulse-more {
  animation: pulse-more 0.4s infinite alternate;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  51% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.blink {
  animation: blink 1s linear infinite;
}

.icon-flag {
  font-size: 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.icon-flag::after {
  content: "";
  display: block;
  width: 1.8rem;
  height: 1.2rem;
  margin-left: 0.5rem;
  background: url(../assets/images/dk.svg) no-repeat center;
  background-size: 100%;
}

.heart {
  font-size: 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.heart::after {
  content: "";
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  margin-left: 0.5rem;
  background: url(../assets/images/heart.webp) no-repeat center;
  background-size: 100%;
}

/* WIDGET BASE STYLES */

.widget {
  border-radius: 1rem;
  background-color: var(--aspit-night-green);
  min-height: 100px;
  position: relative;
  padding: 1.4rem;
  line-height: var(--line-height);
}

.widget::before {
  content: "";
  width: 2rem;
  height: 2rem;
  background: hsla(0, 0%, 0%, 0.3) url(/assets/images/icon-close.svg) center;
  background-size: 80%;
  border-radius: 50%;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.widget__header {
  font-size: 1.4rem;
  transition: font-size 0.3s;
  font-weight: bold;
  color: var(--aspit-red);
  margin-bottom: var(--gutter-small);
  padding-right: var(--gutter-large);
}

.widget__content {
  hyphens: auto;
  opacity: 0;
  animation: fadeup 0.5s forwards;
}

@keyframes fadeup {
  to {
    opacity: 1;
  }
}

.widget__description {
  margin-bottom: 1.4rem;
  color: #ccc;
}

.widget__subtitle {
  font-size: 110%;
  font-weight: bold;
  color: var(--aspit-red);
  margin: 2rem 0 0.5rem 0;
}

.widget__listitem {
  display: grid;
  grid-template-columns: 1fr auto 3rem;
  padding: 0.2rem;
  column-gap: var(--gutter-small);
}

.widget__listitem > *:nth-child(1n + 2) {
  text-align: right;
}

@media (min-width: 74rem) {
  .widget {
    border-radius: 1rem;
    background-color: var(--aspit-night-green);
    min-height: 100px;
    position: relative;
    padding: 1.4rem 2rem 2rem 2rem;
  }

  .widget__header {
    font-size: 1.7rem;
  }
}

/*//////////////////// RESPONSIVE DESIGN ///////////////////*/

@media (min-width: 50rem) {
  .page-header {
    font-size: 1.6rem;
    padding: 0 var(--gutter-large);
  }

  .site-title,
  .site-title:last-of-type {
    font-size: 1.2rem;
  }

  .site-title:last-of-type > time:first-child {
    display: block;
  }

  .site-logo {
    width: 3rem;
    height: 3rem;
  }

  .site-title {
    grid-template-columns: auto auto;
  }

  .page-content {
    padding-top: 1rem;
  }
}

@media (min-width: 60rem) {
  .page-content,
  .page-column-group,
  .page-column {
    gap: var(--gutter-large);
  }

  .page-content {
    padding: var(--gutter-large);
    padding-top: 1rem;
    padding-bottom: 0;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1440px) {
  .page-column-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gutter-large);
    align-items: start;
  }
}
