/*
================================
Markus Heinlein
01-2024
================================
*/

/*
------------------------------
PAGE
------------------------------
*/

body {
  min-height: 100vh;

  background-image: var(--theme-hero-background);

  background-size: cover;
  background-position: center center;

  overflow: hidden;
}

@supports (min-height: 100svh) {
  #hero {
    min-height: 100svh;
  }
}

/*
------------------------------
LOGIN
------------------------------
*/

#login {
  position: absolute;
  z-index: 2;

  bottom: 12vh;
  left: 8vw;

  width: 390px;
  height: auto;
}

#login.shake {
  animation: shake 0.5s;
}

.login__wrapper {
  padding: 30px;
  height: auto;

  background-image: linear-gradient(0deg, #000, #272727);
}

.login__wrapper::before,
.login__wrapper::after {
  position: absolute;

  content: "";

  top: -2px;
  left: -2px;

  width: calc(100% + 4px);
  height: calc(100% + 4px);

  background-image: linear-gradient(
    45deg,
    #424242,
    #cecece,
    #fff,
    #424242,
    #cecece,
    #424242,
    #fff,
    #cecece,
    #424242
  );
  background-size: 400%;

  z-index: -1;
  /* opacity: 0.8; */

  animation: steam 60s linear infinite;
}

.login__wrapper::after {
  filter: blur(40px);
}

@keyframes steam {
  0%,
  100% {
    background-position: 0 0;
  }

  50% {
    background-position: 400% 0;
  }
}

/* Info */

.login__info {
  padding: 0 0 25px;
}

/* Wrapper */

.login__password-wrapper {
  display: flex;
  gap: 5px;

  height: 44px;
  margin: 10px 0;

  background-color: #272727;
  border: 2px solid #9b9b9b;
}

/* Form */

.login__form {
  display: flex;
  flex-direction: column;
}

/* Label */

.login__password-label {
  cursor: var(--theme-pointer-cursor), auto;
}

/* Input */

.login__password {
  flex-grow: 1;

  height: 100%;
  width: 100%;

  margin: 0 10px;

  font-size: 1.5rem;

  background-color: #272727;
  color: var(--theme-font-color);

  border: none;
  outline: none;

  cursor: var(--theme-text-cursor), auto;
}

.login__password-caps,
.login__password-mask {
  --button-size: 40px;

  width: var(--button-size);
  height: var(--button-size);

  display: flex;
  align-items: center;
  justify-content: center;

  outline: none;
  box-shadow: none;

  cursor: var(--theme-link-cursor), auto;
}

.login__password-mask {
  margin-right: 5px;
}

.login__password-mask.show::before,
.login__password-mask.hide::before {
  --image-size: 35px;

  content: "";

  display: inline-block;

  width: var(--image-size);
  height: var(--image-size);

  mask-size: contain;
  -webkit-mask-size: contain;

  background-color: var(--theme-font-color);
}

.login__password-mask.show::before {
  mask-image: var(--theme-show-icon);
  -webkit-mask-image: var(--theme-show-icon);
}

.login__password-mask.hide::before {
  mask-image: var(--theme-hide-icon);
  -webkit-mask-image: var(--theme-hide-icon);
}

.login__password-caps.on::before {
  --image-size: 32px;

  content: "";

  display: inline-block;

  width: var(--image-size);
  height: var(--image-size);

  mask-image: var(--theme-caps-icon);
  mask-size: contain;
  -webkit-mask-image: var(--theme-caps-icon);
  -webkit-mask-size: contain;

  background-color: var(--theme-orange-accent-color);
}

.login__password-caps.off {
  display: none;
}

/* Button */

.login__button {
  width: fit-content;
  margin-left: auto;
  margin-top: 5px;
}

/* Error */

.login__error {
  position: absolute;
  display: none;
  margin: 15px 0;

  width: fit-content;
  height: 40px;
  line-height: 40px;

  color: var(--theme-red-accent-color);
}

.login__contact:hover {
  color: var(--theme-orange-accent-color);
}

@media (max-width: 768px) {
  #login {
    top: 50%;
    left: 50%;
    bottom: unset;
    transform: translate(-50%, -50%);
    margin: 0;
    width: 75vw;
  }
}

/*
------------------------------
LEGAL
------------------------------
*/

#legal {
  position: absolute;

  width: 100%;
  padding: 15px 0;

  text-align: center;
}

#legal a {
  position: relative;
  cursor: var(--theme-link-cursor), auto;
}

#legal a::before {
  position: absolute;
  display: block;

  content: "";

  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 0;

  background-color: var(--theme-orange-accent-color);

  transform: scaleX(0);
  transition: all 200ms ease-in-out;
}

#legal a:hover::before {
  transform: scaleX(1);
}

#legal a:hover {
  color: var(--theme-orange-accent-color);
}

/*
------------------------------
OVERLAY
------------------------------
*/

#overlay {
  position: fixed;
  z-index: 4;

  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-color: #000;

  opacity: 0;
  transition: opacity 0.3s ease;

  pointer-events: none;
}

#overlay.show {
  opacity: 0.5;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

/*
------------------------------
POPUPS
------------------------------
*/

#popup {
  --init-height: 70vh;
  --init-width: 60vw;

  display: none;
  position: fixed;
  overflow: auto;
  z-index: 5;

  min-height: 300px;
  min-width: 500px;

  height: var(--init-height);
  width: var(--init-width);

  top: calc((100vh - var(--init-height)) / 2);
  left: calc((100vw - var(--init-width)) / 2);

  border: 2px solid #d2d2d2;
  background-color: #4f4e4c;

  resize: both;
}

.popup__header {
  position: absolute;

  left: 30px;
  top: 40px;

  padding: 5px 0;
  line-height: 0.7;
}

.popup__content {
  position: absolute;

  overflow-y: scroll;
  overflow-x: hidden;

  left: 0;
  right: 0;
  top: 70px;
  bottom: 0;

  padding-right: 20px;
  margin: 30px;

  line-height: 1.5;
}

.popup__drag {
  position: absolute;

  left: 0;
  right: 0;
  top: 0;

  height: 16px;
  margin: 5px;

  background-image: repeating-linear-gradient(0deg, #444444, #444444 2px, #707070 2px, #707070 4px);

  cursor: move;

  z-index: 1;
}

.popup__drag::before {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  top: 0;

  height: 16px;

  background-image: repeating-linear-gradient(0deg, #444444, #444444 2px, #ffa500 2px, #ffa500 4px);

  z-index: -1;
  opacity: 0;

  transition: opacity 100ms linear;
}

.popup__drag:hover::before {
  opacity: 1;
}

.popup__close {
  position: absolute;

  right: 25px;
  top: 45px;

  display: flex;
  align-items: center;

  outline: none;
  box-shadow: none;
}

.popup__close::before {
  --image-size: 25px;

  content: "";

  display: inline-block;

  width: var(--image-size);
  height: var(--image-size);

  mask-image: var(--theme-close-icon);
  mask-size: contain;
  -webkit-mask-image: var(--theme-close-icon);
  -webkit-mask-size: contain;

  background-color: var(--theme-font-color);

  cursor: var(--theme-link-cursor), auto;

  transition: background-color 150ms ease-in-out;
}

.popup__close:hover::before {
  background-color: var(--theme-orange-accent-color);
}

.popup__size {
  position: absolute;

  height: 15px;
  width: 15px;

  right: 0;
  bottom: 0;

  margin: 10px;

  border-right: 2px solid #707070;
  border-bottom: 2px solid #707070;
}

::-webkit-resizer {
  display: none;
}

::-webkit-scrollbar-track {
  border-radius: 8px;
}

@media (max-width: 768px) {
  #popup {
    min-height: unset;
    min-width: unset;

    height: 90vh;
    height: 90svh;

    width: 90vw;
    min-width: unset;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* @supports (height: 90svh) {
    #hero {
      height: 90svh;
    }
  } */
}

/*
------------------------------
BANNER
------------------------------
*/

#banner {
  position: fixed;
  /* display: flex; */
  display: none;
  z-index: 3;

  justify-content: center;
  align-items: center;

  flex-wrap: wrap;

  top: 0;
  right: 0;

  width: 380px;

  margin: 30px;
  padding: 30px;

  background: #332b00;
  color: var(--theme-orange-accent-color);

  border: 2px solid #665500;
}

.banner__text {
  flex-grow: 1;
}

.banner__text a {
  text-decoration-line: underline;
  text-underline-offset: 6px;
  text-decoration-style: dotted;
  color: var(--theme-orange-accent-color);
}

.banner__accept {
  display: flex;

  justify-content: center;
  align-items: center;

  margin-top: 30px;

  background: hsl(50, 100%, 20%);
  color: hsl(39, 100%, 50%);
}

.banner__accept:hover {
  background: hsl(50, 100%, 25%);
  color: hsl(20, 6%, 90%);
}

@media (max-width: 768px) {
  #banner {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: unset;
    width: 90vw;
  }
}

/*
------------------------------
ANNIVERSARY
------------------------------
*/

#anniversary {
  --image-size: 260px;

  position: absolute;
  z-index: 1;
  visibility: hidden;

  /* left: calc(4vw + ((360px - var(--image-size)) / 2)); */
  right: 8vw;
  bottom: 12vh;

  width: min(80vw, var(--image-size));

  font-family: var(--theme-capital-font);
  font-weight: var(--theme-font-weight-light);

  background-image: linear-gradient(0deg, rgb(0, 0, 0), rgb(39, 39, 39));
  border: 2px solid #424242;

  border-radius: 100%;
}

#anniversary svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

#anniversary text {
  fill: currentColor;
}

#anniversary circle {
  display: none;
  fill: rgba(255, 255, 255, 0.2);
  /* stroke: rgba(255, 255, 255, 0.2); */
  /* stroke: currentColor; */
  stroke-width: 1px;
  /* stroke-dasharray: 1 4; */
}

.anniversary__ring {
  transform-box: view-box;
  transform-origin: 200px 200px;
  animation: spin 60s linear infinite;
}

.anniversary__ring-text {
  font-family: var(--theme-primary-font);
  font-size: 1.5rem;
  white-space: pre;
}

.anniversary__number {
  font-size: 5.5rem;
  letter-spacing: -2px;
  text-anchor: middle;
}

.anniversary__label {
  font-size: 2.75rem;
  text-anchor: middle;
}

@keyframes spin {
  to {
    transform: rotate(-360deg);
  }
}

@media (max-width: 768px) {
  #anniversary {
    display: none;
  }
}
