/* =============================================================================
   BACK TO TOP BUTTON STYLES
   ============================================================================= */

.back-to-top-btn {
  position: fixed;
  bottom: 2rem; /* 32px */
  right: 2rem; /* 32px */
  width: 3rem; /* 48px */
  height: 3rem; /* 48px */
  border-radius: 9999px; /* Full round */
  
  /* Colors */
  background-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Visibility Control */
  opacity: 0;
  pointer-events: none;
  
  /* Animation & Layout */
  transition: opacity 0.3s ease, transform 0.2s ease;
  
  /* UPDATED Z-INDEX: Ensures it sits above the sidebar and header */
  z-index: 999; 
  
  /* Flex Centering */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Reset Button Styles */
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Visible State (Added by JS) */
.back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Hover Effect */
.back-to-top-btn:hover {
  transform: scale(1.1);
}

/* Focus State for Accessibility */
.back-to-top-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}