@import url("/css/fonts/lpmq-isep-misbah/font.css");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");
@import url("/themes/light.css") (prefers-color-scheme: light);
@import url("/themes/dark.css") (prefers-color-scheme: dark);

:root {
  --heading-font: "Isep Misbah", "Noto Sans Condensed", sans-serif;
  --content-font: "Isep Misbah", "Noto Sans", sans-serif;
}

* {
	margin: 0; padding: 0;
  font-family: var(--content-font);
	color: var(--text-color);
	-webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth !important;
}

html {
	background: var(--background);
	width: 100%; min-height: 100%;
}

body {
	position: absolute;
	background: transparent;
	width: 100%; min-height: 100%;
  overflow: auto;
}

a {
	text-decoration: none;
}

abbr {
	text-decoration: none;
}

::placeholder {
	color: var(--placeholder-color);
}

/* BETTER UI */
/* 1. ALERT */
.alert {
  position: fixed;
  right: 0;
  top: 0;
  width: max-content;
  padding: 10px 20px;
  margin-block: 14.2145px;
  background: var(--alert-background);
  backdrop-filter: blur(3px);
  border-left: 3px solid var(--alert-border-color);
  animation: slide-left 500ms ease;
  transform-origin: 100% 50%;
  cursor: pointer;
  z-index: 10000;
  --time: 5000ms;
}
@keyframes slide-left {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
.alert:hover {
  background: var(--alert-hover-background);
  border-left: 3px solid var(--alert-hover-border-color);
  transition: all 200ms ease;
}
.alert:active {
  scale: 0.93;
  filter: blur(1px);
  transition: scale 200ms ease, filter 200ms ease;
}
.alert.removed {
  translate: 100% 0;
  transition: all 500ms ease;
}

.alert::after {
  content: '';
  display: block;
  height: 1px;
  width: 0;
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: var(--alert-progress-color);
  animation: loading var(--time) linear forwards;
}
@keyframes loading {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

.alert--title {
  font-style: italic;
  font-weight: 600;
}
.alert--content {
  font-size: 0.8em;
}

/* 2. PROMPT */
.prompt-wrapper, .confirm-wrapper {
  position: fixed;
  display: grid;
  place-items: center;
  width: 100vw; height: 100vh;
  background: var(--prompt-backdrop);
  backdrop-filter: blur(1px);
  z-index: 9999;
  perspective: 30cm;
  animation: fade-in 500ms ease;
}
.prompt-wrapper.removed,
.confirm-wrapper.removed {
  backdrop-filter: blur(0px);
  background: rgba(0, 0, 0, 0);
  transition: all 300ms ease;
}

.prompt, .confirm {
  display: flex;
  gap: 10px;
  box-sizing: border-box;
  width: calc(100% - 40px); max-width: 500px;
  flex-direction: column;
  padding: 15px 20px;
  background: var(--background);
  border: 1px solid var(--prompt-border-color);
  border-radius: 10px;
  animation: pop-in 200ms ease;
}
.prompt-wrapper.removed .prompt,
.confirm-wrapper.removed .confirm {
  transform: scale(0.95);
  opacity: 0;
  transition: all 200ms ease;
}

@keyframes fade-in {
  from {
    backdrop-filter: blur(0px);
    background: transparent;
  }
  to {
    backdrop-filter: blur(1px);
    background: var(--prompt-backdrop);
  }
}
@keyframes pop-in {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.prompt--title, .confirm--title {
  font-size: 1.2em;
  font-style: italic;
  font-weight: 600;
  margin-bottom: 10px;
}

.prompt--inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prompt--input label {
  position: absolute;
	display: block;
	opacity: 0;
	font-size: 0.95rem;
  margin-left: 15px;
  z-index: 1;
  transform-origin: 0 50%;
  transition: all 200ms ease;
}
.prompt--input:has(input:required) > label::after {
  content: '*';
  color: red;
}
.prompt--input:has(input:placeholder-shown) > label {
  opacity: 50%;
  transform: translateY(7px);
  transition: all 200ms ease;
}
.prompt--input:has(input:focus) > label,
.prompt--input:has(input:not(:placeholder-shown)) > label {
  opacity: 70%;
  transform: translateY(-60%) scale(0.9);
  transition: all 200ms ease;
}

.prompt--input input {
	width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--prompt-input-border-color);
  border-radius: 7px;
  background: transparent;
	padding: 7px 14px;
	font-size: 0.95rem;
	transition: all 200ms ease;
  z-index: 2;
  margin-bottom: 10px;
}
.prompt--input input:focus,
.prompt--input input:not(:placeholder-shown) {
	outline: none !important;
  background: var(--prompt-input-hover-background);
  border-radius: 0;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--prompt-input-border-color);
}
.prompt--input input::placeholder {
  opacity: 0;
}

.prompt--button {
  display: flex;
  gap: 10px;
  box-sizing: border-box;
}

.prompt--button > * {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 1 50%;
  font-size: 0.8em;
  padding: 5px 10px;
  box-sizing: border-box;
  border-radius: 7px;
  cursor: pointer;
}

.prompt--button * {
  color: inherit;
}

.prompt--confirm {
  background: var(--prompt-confirm-background);
  color: var(--background);
  --ripple-color: var(--prompt-confirm-hover-background);
}
/* .prompt--confirm:hover {
  background: var(--prompt-confirm-hover-background);
} */

.prompt--cancel {
  border: 1px solid var(--prompt-confirm-background);
  color: var(--prompt-confirm-background);
  --ripple-color: var(--prompt-cancel-hover-background);
}

/* 3. CONFIRM */
.confirm--title {
  margin-bottom: 0;
}

.confirm--content {
  font-size: 0.9em;
}

@media (orientation: portrait) {
  .prompt, .confirm {
    align-self: start;
    margin-top: 40%;
  }
}

@media (hover: none) {
  .prompt, .confirm {
    transform-origin: 50% 10%;
    animation: pop-in 200ms ease;
  }
  .prompt-wrapper.removed .prompt,
  .confirm-wrapper.removed .confirm {
    transform: scale(0.95);
    opacity: 0;
    transition: all 200ms ease;
  }
}

/* RIPPLE */
.ripple {
  position: relative !important;
  overflow: hidden;
}

.ripple-circle {
  position: absolute;
  background: var(--ripple-color);
  width: var(--size) !important; height: var(--size) !important;
  border-radius: 50%;
  translate: -50% -50%;
  scale: 0;
  animation: ripple-scale calc(var(--time) + 100ms) linear;
  touch-action: none;
  pointer-events: none;
}

@keyframes ripple-scale {
  80% {
    scale: 1;
    opacity: 0.2;
  }
  100% {
    scale: 1;
    opacity: 0;
  }
}