/*!
 * Hanell International - Scroll Indicators Component Styles
 * Developer: Brian Guvava | Company: BLAXIUM (https://blaxium.com)
 * Project: Hanell International Website Redesign v1.0.0
 * Last Updated: June 30, 2025
 * 
 * Component: Scroll Progress & Scroll-to-Top Button
 * Requirements: REQ-008 - Scroll Indicators Component
 */

/* =============================================================================
   SCROLL PROGRESS INDICATOR
   ============================================================================= */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 59, 109, 0.1);
  z-index: var(--z-fixed);
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  width: 0%;
  transition: width 0.1s ease-out;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(0, 59, 109, 0.3);
}

/* Progress bar glow effect */
.scroll-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 153, 204, 0.8));
  filter: blur(3px);
}

/* =============================================================================
   SCROLL-TO-TOP BUTTON
   ============================================================================= */

.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--color-primary) !important;
  color: var(--text-light) !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer;
  z-index: 9999 !important;
  box-shadow: 0 8px 25px rgba(0, 59, 109, 0.3) !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: var(--font-size-xl) !important;
  text-decoration: none !important;
  user-select: none;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  pointer-events: auto !important;
  /* Remove any default Bootstrap button styling */
  background-image: none !important;
  background-clip: padding-box !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  font-family: inherit !important;
  font-weight: 500 !important;
}

.scroll-to-top:link,
.scroll-to-top:visited {
  background: var(--color-primary) !important;
  color: var(--text-light) !important;
  text-decoration: none !important;
  outline: none !important;
}

.scroll-to-top:hover,
.scroll-to-top:focus,
.scroll-to-top:active {
  background: var(--color-primary-dark) !important;
  color: var(--text-light) !important;
  text-decoration: none !important;
  outline: none !important;
}

/* Button hover state */
.scroll-to-top:hover {
  background: var(--color-primary-dark) !important;
  color: var(--text-light) !important;
  transform: translateY(-5px) scale(1.05) !important;
  box-shadow: 0 12px 35px rgba(0, 59, 109, 0.4) !important;
  text-decoration: none !important;
  outline: none !important;
}

/* Button focus state */
.scroll-to-top:focus {
  background: var(--color-primary-dark) !important;
  color: var(--text-light) !important;
  outline: none !important;
  box-shadow: 0 8px 25px rgba(0, 59, 109, 0.3), 0 0 0 3px rgba(0, 59, 109, 0.2) !important;
  text-decoration: none !important;
}

/* Button active state */
.scroll-to-top:active {
  transform: translateY(-2px) scale(0.98) !important;
  background: var(--color-primary-dark) !important;
  color: var(--text-light) !important;
  outline: none !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(0, 59, 109, 0.35) !important;
}

/* Button visible state */
.scroll-to-top.visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
}

/* Button progress ring - REMOVED */
.scroll-to-top::before {
  display: none !important;
}

/* Button icon animation */
.scroll-to-top i {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

.scroll-to-top:hover i {
  transform: translateY(-3px) !important;
  animation: bounceUpSmooth 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Bounce animation */
@keyframes bounceUp {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-4px); }
  50% { transform: translateY(-2px); }
  75% { transform: translateY(-3px); }
}

@keyframes bounceUpSmooth {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(-6px); }
}

/* =============================================================================
   READING PROGRESS INDICATOR (ALTERNATIVE)
   ============================================================================= */

.reading-progress {
  position: fixed;
  top: var(--header-height, 80px);
  right: 30px;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  z-index: var(--z-floating);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px) scale(0.8);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.reading-progress.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

/* Progress circle */
.reading-progress::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 3px solid transparent;
  border-radius: 50%;
  background: conic-gradient(var(--color-accent) var(--reading-progress, 0%), rgba(0, 59, 109, 0.2) 0%);
  mask: radial-gradient(circle at center, transparent 47%, black 49%);
  -webkit-mask: radial-gradient(circle at center, transparent 47%, black 49%);
}

/* Progress percentage text */
.reading-progress-text {
  position: relative;
  z-index: 1;
}

.reading-progress-text::after {
  content: '%';
  font-size: 10px;
  vertical-align: super;
}

/* =============================================================================
   FLOATING ACTION BUTTONS CONTAINER
   ============================================================================= */

.floating-actions {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  z-index: var(--z-floating);
}

.floating-actions .scroll-to-top {
  position: relative;
  bottom: auto;
  right: auto;
  margin: 0;
}

/* =============================================================================
   SCROLL HINTS & INDICATORS
   ============================================================================= */

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  opacity: 0;
  animation: fadeInUp 1s ease-out 2s forwards;
  z-index: var(--z-overlay);
}

.scroll-hint-text {
  color: var(--text-light);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.scroll-hint-arrow {
  width: 24px;
  height: 24px;
  border: 2px solid var(--text-light);
  border-left: none;
  border-top: none;
  transform: rotate(45deg);
  animation: bounceDown 2s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Scroll hint animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes bounceDown {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(5px); }
}

/* Hide scroll hint after scrolling */
.scroll-hint.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  transition: all var(--transition-base);
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

/* Tablet */
@media (max-width: 991.98px) {
  .scroll-to-top,
  .reading-progress {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: var(--font-size-lg);
  }
  
  .floating-actions {
    bottom: 20px;
    right: 20px;
  }
  
  .scroll-hint {
    bottom: 20px;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .scroll-progress {
    height: 3px;
  }
  
  .scroll-to-top,
  .reading-progress {
    width: 45px;
    height: 45px;
    font-size: var(--font-size-base);
    bottom: 15px;
    right: 15px;
  }
  
  .floating-actions {
    bottom: 15px;
    right: 15px;
  }
  
  .reading-progress {
    top: calc(var(--header-height-mobile, 70px) + 10px);
  }
  
  .scroll-hint {
    bottom: 15px;
  }
  
  .scroll-hint-text {
    font-size: var(--font-size-xs);
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .scroll-to-top,
  .reading-progress {
    width: 40px;
    height: 40px;
    font-size: var(--font-size-sm);
  }
  
  .scroll-hint {
    display: none; /* Hide on very small screens */
  }
}

/* =============================================================================
   ACCESSIBILITY & FOCUS STATES
   ============================================================================= */

/* Focus indicators */
.scroll-to-top:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Keyboard navigation support */
.scroll-to-top:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Screen reader support */
.scroll-to-top .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Additional fixes for scroll-to-top button in footer area */
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  z-index: 9999 !important;
  pointer-events: auto !important;
}

/* Ensure button stays above footer elements */
footer * {
  z-index: 1 !important;
}

.footer {
  z-index: 1 !important;
  position: relative;
}

/* Force the scroll-to-top button to be above everything */
.scroll-to-top {
  z-index: 9999 !important;
  position: fixed !important;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .scroll-progress-bar,
  .scroll-to-top,
  .reading-progress,
  .scroll-hint {
    transition: none;
    animation: none;
  }
  
  .scroll-to-top:hover,
  .scroll-to-top.visible {
    transform: none;
  }
  
  .scroll-hint-arrow {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .scroll-progress {
    background: var(--text-primary);
  }
  
  .scroll-progress-bar {
    background: var(--color-accent);
  }
  
  .scroll-to-top {
    border: 2px solid var(--text-light);
  }
  
  .reading-progress {
    border: 3px solid var(--color-primary);
  }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
  .scroll-progress,
  .scroll-to-top,
  .reading-progress,
  .floating-actions,
  .scroll-hint {
    display: none !important;
  }
}

/* =============================================================================
   BOOTSTRAP OVERRIDE - ENSURE SCROLL-TO-TOP BUTTON STYLING
   ============================================================================= */

/* Force override any Bootstrap button styling that might interfere */
button.scroll-to-top,
.btn.scroll-to-top,
button.scroll-to-top:not(:disabled):not(.disabled),
.scroll-to-top.btn:not(:disabled):not(.disabled) {
  background: var(--color-primary) !important;
  background-color: var(--color-primary) !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  color: var(--text-light) !important;
  box-shadow: 0 8px 25px rgba(0, 59, 109, 0.3) !important;
  outline: none !important;
  text-decoration: none !important;
}

button.scroll-to-top:hover,
button.scroll-to-top:focus,
button.scroll-to-top:active,
.btn.scroll-to-top:hover,
.btn.scroll-to-top:focus,
.btn.scroll-to-top:active {
  background: var(--color-primary-dark) !important;
  background-color: var(--color-primary-dark) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: var(--text-light) !important;
  outline: none !important;
  text-decoration: none !important;
  box-shadow: 0 12px 35px rgba(0, 59, 109, 0.4) !important;
}

/* Remove any Bootstrap focus ring */
button.scroll-to-top:focus,
.btn.scroll-to-top:focus {
  box-shadow: 0 8px 25px rgba(0, 59, 109, 0.3), 0 0 0 3px rgba(0, 59, 109, 0.2) !important;
}

/* =============================================================================
   ADDITIONAL OVERRIDES TO REMOVE ALL BLUE COLORS AND BOOTSTRAP STYLING
   ============================================================================= */

/* Complete Bootstrap button override with maximum specificity */
.scroll-to-top,
.scroll-to-top:link,
.scroll-to-top:visited,
.scroll-to-top:hover,
.scroll-to-top:focus,
.scroll-to-top:active,
.scroll-to-top:focus-visible,
.scroll-to-top.focus,
.scroll-to-top.active,
button.scroll-to-top,
button.scroll-to-top:link,
button.scroll-to-top:visited,
button.scroll-to-top:hover,
button.scroll-to-top:focus,
button.scroll-to-top:active,
button.scroll-to-top:focus-visible,
button.scroll-to-top.focus,
button.scroll-to-top.active,
html button.scroll-to-top,
body button.scroll-to-top,
html .scroll-to-top,
body .scroll-to-top {
  /* Remove all Bootstrap blue colors with maximum priority */
  background: #003B6D !important;
  background-color: #003B6D !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: 0 8px 25px rgba(0, 59, 109, 0.3) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  outline: none !important;
  /* Force removal of any Bootstrap styling */
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  /* Positioning and size */
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.scroll-to-top:hover,
.scroll-to-top:focus,
.scroll-to-top:active,
button.scroll-to-top:hover,
button.scroll-to-top:focus,
button.scroll-to-top:active,
html button.scroll-to-top:hover,
html button.scroll-to-top:focus,
html button.scroll-to-top:active,
html .scroll-to-top:hover,
html .scroll-to-top:focus,
html .scroll-to-top:active,
body button.scroll-to-top:hover,
body button.scroll-to-top:focus,
body button.scroll-to-top:active,
body .scroll-to-top:hover,
body .scroll-to-top:focus,
body .scroll-to-top:active {
  background: #1a3a21 !important;
  background-color: #1a3a21 !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: 0 12px 35px rgba(0, 59, 109, 0.4) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  outline: none !important;
  transform: translateY(-5px) scale(1.05) !important;
}

/* COMPLETELY REMOVE progress ring and all pseudo-elements */
.scroll-to-top::before,
.scroll-to-top::after,
button.scroll-to-top::before,
button.scroll-to-top::after,
html .scroll-to-top::before,
html .scroll-to-top::after,
body .scroll-to-top::before,
body .scroll-to-top::after,
html button.scroll-to-top::before,
html button.scroll-to-top::after,
body button.scroll-to-top::before,
body button.scroll-to-top::after {
  display: none !important;
  content: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Force clean button appearance with no Bootstrap interference */
.scroll-to-top,
button.scroll-to-top,
html .scroll-to-top,
body .scroll-to-top,
html button.scroll-to-top,
body button.scroll-to-top {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-clip: padding-box !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  /* Remove any Bootstrap focus rings or outlines */
  box-shadow: 0 8px 25px rgba(0, 59, 109, 0.3) !important;
  border-width: 0 !important;
  border-style: none !important;
  /* Ensure no unwanted transitions from Bootstrap */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Additional anti-Bootstrap overrides */
[class*="btn"].scroll-to-top,
.btn.scroll-to-top,
button[class*="btn"].scroll-to-top {
  all: unset !important;
  /* Reapply only our custom styles */
  background: #003B6D !important;
  color: #ffffff !important;
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 20px !important;
  box-shadow: 0 8px 25px rgba(0, 59, 109, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
