/*
 * Quark 2 — user customizations
 *
 * This file is safe to edit. It is loaded last so anything here overrides
 * theme.css without having to mark rules !important.
 */

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--q2-accent, #333333);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  padding: 0;
  outline: none;
}

[data-theme='dark'] .back-to-top {
  background: rgba(18, 18, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  color: var(--q2-accent, #ffffff);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] .back-to-top:hover {
  background: rgba(28, 28, 28, 0.8);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.back-to-top:active {
  transform: translateY(-2px) scale(0.96);
}

.back-to-top:focus-visible {
  box-shadow: 0 0 0 3px var(--q2-focus-ring, rgba(0, 122, 204, 0.4));
}

/* Progress SVG */
.back-to-top-progress {
  position: absolute;
  top: -1px;
  left: -1px;
  transform: rotate(-90deg);
  width: 48px;
  height: 48px;
  pointer-events: none;
}

.back-to-top-progress-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.03);
  stroke-width: 2.5;
}

[data-theme='dark'] .back-to-top-progress-bg {
  stroke: rgba(255, 255, 255, 0.03);
}

.back-to-top-progress-fill {
  fill: none;
  stroke: var(--q2-accent, #333333);
  stroke-width: 2.5;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.08s linear;
}

.back-to-top-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.back-to-top:hover .back-to-top-icon {
  transform: translateY(-2px);
}

