body {
  background-color: #f0f0f0;
  opacity: 1;
  transition: opacity 0.2s ease;
}
html,
body {
  overscroll-behavior: none;
}
body.fade-out {
  opacity: 0;
}

* {
  scrollbar-width: thin;
}
/* CSS for a discrete and 4px width scrollbar */
::-webkit-scrollbar {
  width: 4px; /* Width of the scrollbar */
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.5); /* Color of the scrollbar thumb */
  border-radius: 2px; /* Rounded edges for the thumb */
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.7); /* Darker color when hovered */
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1); /* Background color of the scrollbar track */
  border-radius: 2px; /* Rounded edges for the track */
}

/* Loading spinner */
/* HTML: <div class="loader"></div> */
.loader {
  width: 30px;
  margin: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(farthest-side, #7e7e7e, 94%, #0000) top/8px 8px no-repeat,
    conic-gradient(#0000 30%, #7e7e7e);
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
  animation: l13 1s infinite linear;
}
@keyframes l13 {
  100% {
    transform: rotate(1turn);
  }
}

/* Block editor css */
.block-editor h1,
.block-editor h2,
.block-editor h3,
.block-editor h4,
.block-editor h5,
.block-editor h6 {
  font-weight: bold;
}
.block-editor h1 {
  font-size: 2em;
}
.block-editor h2 {
  font-size: 1.7em;
}
.block-editor h3 {
  font-size: 1.4em;
}
.block-editor h4 {
  font-size: 1.1em;
}

.block-editor blockquote {
  border-left: 4px solid #ccc;
  padding-left: 10px;
  margin-left: 0;
  color: #555;
  font-style: italic;
  background-color: #f9f9f9;
}
.block-editor blockquote footer {
  text-align: right;
  padding-right: 4px;
}

/* model-viewer hotspot */
.hotspot {
  opacity: 1;
}
.hotspot:not([data-visible]) {
  opacity: 0.2;
}

/* model-viewer custom progress bar */
model-viewer::part(default-progress-bar) {
  display: none;
}

.custom-model-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(252, 252, 252, 0.92);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  font-family: "Haffer", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  transition: opacity 140ms ease;
}

.custom-model-loader.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  width: 60%;
}

.loader-text {
  font-weight: 600;
  color: #111;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Visual Track */
.progress-bar-track {
  width: 100%;
  height: 0.25rem;
  background-color: #e0e0e0;
  border-radius: 999rem;
  overflow: hidden;
}

/* Visual Fill */
.progress-bar-fill {
  width: 0%;
  height: 100%;
  background-color: #111;
  border-radius: 999rem;
  transition: width 0.1s ease-out;
}

/* error */
#error {
  color: #9f2626;
  cursor: pointer;
  font-weight: bold;
  border: 0.06rem solid black;
  margin: 4rem 1rem 1rem 1.5rem;
  z-index: 10;
  background-color: #fcfcfc;
  position: absolute;
  padding: 1rem;
  border-radius: 0.2rem;
}
#error:empty {
  display: none;
}

#user-storage-usage {
  width: 100%;
  margin: 0.5rem 0;
  > div:first-of-type {
    width: 100%;
    height: 4px;
    background-color: #d9d9d9;
    position: relative;
    > div {
      position: absolute;
      top: 0;
      left: 0;
      width: 0%;
      height: 4px;
      background-color: #529a41;
    }
  }
  p {
    font-size: 0.8rem;
    margin-top: 0.5rem;
  }
}
