/* Author: @flick9000 */
/* Global Styling */

:root {
  --background: #202020;
  --text: #fff;
  --muted: #ccc;
  --primary: #6040bf;
}

@keyframes pop-in {
  from {
    transform: translateY(10rem);
  }
  to {
    transform: translateY(0px);
  }
}

@keyframes slide-out {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-150%);
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --background: #fff;
    --text: #000;
    --muted: #555;
  }

  .sidebar-entry.active {
    background-color: hsl(from var(--text) h s l / 0.035) !important;
  }

  .sidebar-entry:hover {
    background-color: hsl(from var(--text) h s l / 0.025) !important;
  }

  .nav-icon {
    filter: invert(1);
  }

  .content-entry {
    background-color: hsl(from var(--background) h s l / 0.7) !important;
    border: 1px solid hsl(from var(--text) h s l / 0.1) !important;
  }

  .content-entry:hover {
    background-color: hsl(from var(--background) h s l / 0.25) !important;
  }

  .content-entry:has(button):hover {
    background-color: hsl(from var(--background) h s l / 0.7) !important;
  }

  .content-entry img {
    filter: invert(1);
  }

  .mockup-code {
    background-color: hsl(from var(--background) h s l / 0.7) !important;
  }

  .slider {
    background-color: #f5f5f5 !important;
  }

  .slider:before {
    background-color: #5d5d5d !important;
  }

  input:checked + .slider {
    background-color: #6040bf !important;
  }

  input:focus + .slider {
    box-shadow: 0 0 1px #6040bf !important;
  }

  input:checked + .slider:before {
    background-color: white !important;
  }

  button {
    background-color: hsl(from var(--background) h s l / 0.8) !important;
    border: 1px solid hsl(from var(--text) h s l / 0.05) !important;
    border-bottom: 1px solid hsl(from var(--text) h s l / 0.2) !important;
  }

  button:hover {
    background-color: hsl(from var(--background) h s l / 0.4) !important;
  }

  .content-entry:has(button):hover {
    background-color: hsl(from var(--text) h s l / 0.05);
  }

  .app-search {
    background-color: hsl(from var(--background) h s l / 0.8) !important;
    border: 1px solid hsl(from var(--text) h s l / 0.05) !important;
    border-bottom: 1px solid hsl(from var(--text) h s l / 0.2) !important;
  }
}

* {
  user-select: none;
}

html {
  scroll-behavior: smooth;
  user-select: none;
  font-size: 14px;
}

body {
  font-family: system-ui, sans-serif;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  min-height: 100vh;
  color: var(--text);
  overflow: hidden !important;
}

::-webkit-scrollbar {
  width: 2px;
  height: 2px;
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #a0a0a0;
}

h1 {
  line-height: 1.5;
  text-wrap: balance;
}

button {
  min-width: 130px;
  min-height: 32px;
  border-radius: 5px;
  border: none;
  background-color: hsl(from var(--text) h s l / 0.055);
  border: 1px solid hsl(from var(--text) h s l / 0.02);
  cursor: pointer;
  z-index: 1;
}

hr {
  border-top: 1px solid hsl(from var(--text) h s l / 0.1);
  margin-block: 0.25rem;
}

button:hover {
  background-color: hsl(from var(--text) h s l / 0.07);
}

.main-container {
  display: flex;
  padding-block: 1.5rem;
}

.content {
  margin-left: 342px !important;
  margin-right: 1rem;
  width: 100%;
}

.content-header {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 1rem;
}

.nav-icon {
  display: none;
  cursor: pointer;
}

.content-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: hsl(from var(--text) h s l / 0.05);
  border: 1px solid hsla(0, 0%, 0%, 0.3);
  padding-inline: 12px;
  border-radius: 5px;
  min-height: 64px;
}

.content-entry:hover {
  background-color: hsl(from var(--text) h s l / 0.083);
}

.content-entry:has(button):hover {
  background-color: hsl(from var(--text) h s l / 0.05);
}

.content-entry img {
  max-width: 20px;
}

.content-entry .chevron {
  max-width: 12px;
  margin-right: 8px;
  transition: transform 0.2s ease-out;
}

.content-entry > div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.content-entry > summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.content-entry > summary > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.content-entry > summary > div p {
  font-size: 12px;
  color: var(--muted);
}

.content-entry.about {
  height: fit-content;
  padding-inline: 48px;
  padding-block: 16px;
}

details {
  interpolate-size: allow-keywords;
  &::details-content {
    opacity: 0.3;
    block-size: 0;
    overflow-y: clip;
    transition:
      content-visibility 0.2s allow-discrete,
      opacity 0.2s,
      block-size 0.2s ease-in-out;
  }
  &[open]::details-content {
    opacity: 1;
    block-size: auto;
  }
}

details summary::-webkit-details-marker {
  display: none;
}

details > div.content-entry img {
  max-width: 14px;
}

details > div.content-entry {
  margin-top: 4px;
  padding-left: 48px;
  height: 56px;
}

details[open] .chevron {
  transform: rotate(180deg);
  transition: transform 0.2s ease-out;
}

.content-entry > div > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.content-entry > div > div p {
  font-size: 12px;
  color: var(--muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #272727;
  border: 1px solid #a0a0a0;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 4px;
  bottom: 3px;
  background-color: #cecece;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #6040bf;
  border: none;
}

input:focus + .slider {
  box-shadow: 0 0 1px #6040bf;
}

input:checked + .slider:before {
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  bottom: 4px;
  transform: translateX(20px);
  background-color: black;
}

.indicator {
  margin-left: 1rem;
}

.app-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid hsl(from var(--text) h s l / 0.05);
  border-bottom: 1px solid hsl(from var(--text) h s l / 0.5);
  padding-inline: 12px;
  border-radius: 5px;
  min-height: 32px;
  width: 100%;
  max-width: 300px;
  background-color: hsl(from var(--text) h s l / 0.05);
  margin-bottom: 1rem;
}

.app-search:focus {
  outline: none;
}

.manual-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

#manualInput {
  margin-bottom: 0;
  max-width: 160px;
  &::placeholder {
    font-size: 12px;
  }
}

#manualList {
  margin-left: 4px;
  margin-block: 8px;
  color: var(--muted);
}

.content {
  overflow: hidden !important;
}

@media screen and (max-width: 800px) {
  .content {
    margin-left: 1.5rem !important;
    transition: margin-left 0.3s ease;
    width: 100%;
  }

  .nav-icon {
    display: flex;
  }

  .content.responsive {
    margin-left: 342px !important;
  }
}

@media (min-width: 800px) {
  .content-entry > div > div p {
    display: block !important;
  }
}
