/**
 * Content Revealer Styles - Enhanced Version
 * 
 * Provides animations, indicators, and utility classes for a more deliberate content reveal experience
 */

/* Hidden State */
.hidden-item {
  opacity: 0;
  transform: translateY(20px);
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.slide-in-right {
  animation: slideInRight 0.8s ease forwards;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease forwards;
}

.slide-up {
  animation: slideUp 0.8s ease forwards;
}

.slide-down {
  animation: slideDown 0.8s ease forwards;
}

.zoom-in {
  animation: zoomIn 0.8s ease forwards;
}

.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

/* Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { 
    opacity: 0;
    transform: translateX(50px);
  }
  to { 
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from { 
    opacity: 0;
    transform: translateX(-50px);
  }
  to { 
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from { 
    opacity: 0;
    transform: translateY(-30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from { 
    opacity: 0;
    transform: scale(0.95);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  20% {
    transform: scale(1.1);
  }
  40% {
    transform: scale(0.9);
  }
  60% {
    opacity: 1;
    transform: scale(1.03);
  }
  80% {
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Helper utility classes */
.d-none {
  display: none !important;
}

/* Staggered animation delays for child elements */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1s; }

/* Button styling */
.revealer-button {
  display: block;
  width: 60%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  text-align: center;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #198754; /* Bootstrap success color */
  background-color: transparent;
  border: 1px solid #198754;
}

.revealer-button:hover {
  color: #fff;
  background-color: #198754;
  border-color: #198754;
  cursor: pointer;
}


/* Initial hidden state for animated intro elements */
.intro-title,
.intro-subtitle,
.intro-paragraph,
.intro-button {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Animation classes for intro elements */
.intro-title {
  transition-delay: 0.1s;
}

.intro-subtitle,
.intro-paragraph {
  transform: translateY(20px);
}

.intro-subtitle.slide-down,
.intro-paragraph.slide-down {
  transform: translateY(0);
}

.intro-button.fade-in {
  transition-delay: 0.3s;
}

/* Progress indicator styles */
.progress-indicator {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #dee2e6;
  margin: 0 6px;
  transition: background-color 0.3s ease;
}

.progress-dot.active {
  background-color: #198754;
}

.progress-dot.completed {
  background-color: #0dcaf0;
}

/* Content reveal container */
.reveal-container {
  overflow: hidden;
  transition: max-height 0.5s ease;
}

/* Module progress indicator styles */
.progress-indicator {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
  position: relative;
}

.progress-indicator::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 0;
  height: 2px;
  background-color: #dee2e6;
  width: 100%;
  z-index: 0;
}

.progress-indicator .progress-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  position: relative;
  z-index: 1;
  color: #6c757d;
  transition: color 0.3s ease;
}

.progress-indicator .progress-item:hover {
  color: #212529;
}

.progress-indicator .progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid #dee2e6;
  margin-bottom: 0.25rem;
  transition: all 0.3s ease;
}

.progress-indicator .progress-label {
  font-size: 0.75rem;
  font-weight: 500;
  transition: transform 0.3s ease;
}

/* Current section */
.progress-indicator .progress-item.current .progress-dot {
  background-color: #0d6efd;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.progress-indicator .progress-item.current .progress-label {
  color: #0d6efd;
  font-weight: 700;
  transform: scale(1.1);
}

/* Completed sections */
.progress-indicator .progress-item.completed .progress-dot {
  background-color: #198754;
  border-color: #198754;
}

.progress-indicator .progress-item.completed .progress-label {
  color: #198754;
}

/* Progress track fill */
.progress-indicator .progress-track {
  position: absolute;
  top: 7px;
  left: 0;
  height: 2px;
  background-color: #198754;
  width: 0;
  z-index: 0;
  transition: width 0.5s ease;
}

/* ENHANCED: Scroll indicator styles */
.scroll-reveal-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
  margin-right: 2rem;
  padding: 1rem;
  text-align: center;
  opacity: 0.7;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 8px;
  font-size: 3rem;
  cursor: pointer;
}

.scroll-reveal-indicator:hover {
  opacity: 1;
}

/* Enhanced scroll indicators */
.scroll-reveal-indicator.enhanced {
  border-top: 1px solid rgba(25, 135, 84, 0.2);
  border-bottom: 1px solid rgba(25, 135, 84, 0.2);
  padding: 15px;
  background-color: rgba(25, 135, 84, 0.05);
  margin: 20px 0;
  opacity: 0.9;
}

.scroll-reveal-indicator.enhanced:hover {
  background-color: rgba(25, 135, 84, 0.1);
  opacity: 1;
}

/* Bounce Animation for Scroll Indicator */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Apply the animation to the chevron icon inside scroll indicators */
.scroll-reveal-indicator i.bi-chevron-compact-down {
  display: inline-block;
  animation: bounce 2s infinite;
  color: #198754; /* Bootstrap success green */
}

.scroll-down-arrow {
  font-size: 1.5rem;
  animation: pulse 2s infinite;
  color: #198754;
}

.indicator-text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6c757d;
}

/* Continue button in scroll indicators */
.continue-button {
  display: block;
  margin: 10px auto 0;
  transition: all 0.3s ease;
  padding: 0.375rem 0.75rem;
  background-color: transparent;
  color: #198754;
  border: 1px solid #198754;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 400;
  text-align: center;
}

.continue-button:hover {
  background-color: #198754;
  color: white;
  transform: translateY(2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Animation keyframes */
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.7; }
}

/* Arrow-down animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Fade-in effect for newly revealed sections */
.reveal-fade-in {
  opacity: 0;
  animation: revealFadeIn 0.8s ease forwards;
}

@keyframes revealFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll feedback styles */
.scroll-feedback {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(25, 135, 84, 0.9);
  color: white;
  padding: 10px 15px;
  border-radius: 20px;
  z-index: 1000;
  font-size: 14px;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: fadeInUp 0.3s ease-out;
}

.scroll-progress-container {
  background-color: rgba(255,255,255,0.3);
  height: 5px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 5px;
}

.scroll-progress-bar {
  height: 100%;
  background-color: white;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.scroll-feedback-text {
  font-weight: 500;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Ripple effect for button press */
.reveal-ripple {
  width: 50px;
  height: 50px;
  background-color: rgba(25, 135, 84, 0.5);
  border-radius: 50%;
  position: fixed;
  z-index: 1000;
  animation: rippleEffect 1s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  0% {
    transform: translateX(-50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(3);
    opacity: 0;
  }
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
  .scroll-reveal-indicator {
    margin: 1rem 0;
  }
  
  .scroll-down-arrow {
    font-size: 1.25rem;
  }
  
  .indicator-text {
    font-size: 0.75rem;
  }
  
  .continue-button {
    width: 80%;
    padding: 0.5rem;
  }
  
  .scroll-feedback {
    width: 90%;
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* Super simple reveal effect - no JavaScript needed */
[data-reveal-on-scroll] {
  animation: simpleReveal 1s ease-out;
}

@keyframes simpleReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
    background-color: rgba(25, 135, 84, 0.1);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    background-color: transparent;
  }
}

/**
 * Progress Tracker Styles for content-revealer.js
 * 
 * These styles can be added to content-revealer.css or directly injected
 * via JavaScript as shown in the JS implementation.
 */

/* Main container */
.section-progress-tracker {
  position: fixed;
  bottom: 20px;
  left: 20px;
  border-radius: 8px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  border: 0px solid rgba(0, 0, 0, 0.1);
  opacity: 0.85;
}


/* Progress bar container */
.progress-tracker-bar {
  height: 6px;
  background-color: #1987541c;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

/* Progress bar fill */
.progress-tracker-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress-width, 0%);
  background-color: #198754; /* Bootstrap green */
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress indicator text */
.progress-tracker-text {
  font-size: 12px;
  color: #495057;
  text-align: center;
  font-weight: 500;
}

/* Completed state */
.section-progress-tracker.completed .progress-tracker-bar::after {
  background-color: #198754;
}

.section-progress-tracker.completed .progress-tracker-text {
  color: #198754;
}


/* Responsive adjustments */
@media (max-width: 992px) {
  .section-progress-tracker {
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0;
    border-radius: 0;
    border-width: 1px 0 0 0;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.1);
    max-width: none;
  }
  
  .progress-tracker-header,
  .progress-tracker-text,
  .progress-tracker-sections {
    display: none;
  }
  
  .progress-tracker-bar {
    height: 6px;
    margin-bottom: 0;
    border-radius: 0;
  }
  
  .section-progress-tracker.minimized {
    padding: 0;
    width: 100%;
    height: auto;
    border-radius: 0;
  }
  
  /* Make sure the full bar is always visible */
  .section-progress-tracker.minimized .progress-tracker-bar {
    display: block;
  }
  
  /* Ensure progress bar fill has rounded edge only on right side */
  .progress-tracker-fill {
    border-radius: 0 4px 4px 0;
  }}

  /* Add these styles to content-revealer.css */

/* Reset icon styling */
.progress-tracker-text .bi-arrow-counterclockwise {
  transition: transform 0.3s ease, color 0.3s ease;
  color: #6c757d; /* Bootstrap secondary color */
}

.progress-tracker-text .bi-arrow-counterclockwise:hover {
  transform: rotate(-90deg);
  color: #dc3545; /* Bootstrap danger color - red */
}

/* Add a subtle pulse effect on hover */
@keyframes pulse-reset {
  0% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.1) rotate(-180deg); }
  100% { transform: scale(1) rotate(-360deg); }
}

.progress-tracker-text .bi-arrow-counterclockwise:hover {
  animation: pulse-reset 1s ease infinite;
}

/* Mobile responsive adjustments */
@media (max-width: 992px) {
  .progress-tracker-text {
    display: flex !important; /* Override previous hiding */
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
  }
  
  .progress-tracker-text .bi-arrow-counterclockwise {
    font-size: 14px; /* Larger icon for better touch targets */
    padding: 4px;
  }
}

/* Simple Skip Utility Styles */

/* Scroll indicator with skip option */
.scroll-reveal-indicator.has-skip-option {


  padding-left: 20px;
}

/* Skip button styling */
.force-skip-btn {
  transition: all 0.3s ease;
  color: #999;
  font-size: 0.875rem;
  font-weight: 500;

}


.force-skip-btn i {
  margin-right: 6px;
}



/* Mobile responsive */
@media (max-width: 768px) {
  .force-skip-btn {
    width: 100%;
    min-width: auto;
  }
  
  .scroll-reveal-indicator.has-skip-option {
    padding-left: 15px;
  }
}


/* ORANGE STYLING: When skip option is available */

/* Orange chevron when skip is available */
.scroll-reveal-indicator.has-skip-option i.bi-chevron-compact-down {
  color: #e8c816; /* Orange color */
  animation: none;
}

/* =============================================================================
 * TABLE OF CONTENTS CHECKMARKS - UPDATED FOR LEFT EDGE POSITIONING
 * =============================================================================
 */

/* Menu item layout - position checkmarks on left edge */
.trans-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Changed from space-between */
  padding: 0.5rem 0.75rem;
  position: relative; /* Added for absolute positioning of checkmark */
}

/* Checkmarks positioned on left edge, vertically centered - keeping original styling */
.section-completion-check {
  position: absolute; /* Changed from inline-flex */
  left: 0; /* Position at left edge */
  top: 50%; /* Position at vertical center */
  transform: translateY(-50%) scale(0.8); /* Center vertically and keep original scale */
  display: inline-flex; /* Keep original display */
  align-items: center;
  justify-content: center;
  width: 16px; /* Keep original size */
  height: 16px;
  border-radius: 50%;
  color: #198754; /* Keep original color */
  font-size: 10px; /* Keep original font size */
  margin-left: 0; /* Remove margin since we're positioning absolutely */
  opacity: 0;
  transition: all 0.3s ease;
  visibility: hidden; /* Keep original visibility behavior */
  z-index: 10; /* Ensure it appears on top */
}

/* Show checkmark when complete */
.section-completion-check.show {
  opacity: 1;
  transform: translateY(-50%) scale(1); /* Maintain vertical centering with scale */
  visibility: visible;
}

.section-completion-check i {
  font-size: 2.8rem; /* Keep original icon size */
}

/* Ensure text has proper left margin to avoid overlap with checkmark */
.trans-menu-item > span:first-child {
  flex: 1;
  margin-left: 0; /* Text starts normally, checkmark overlays on top */
}

/* Animation for checkmark appearance - keep original */
@keyframes checkmarkBounce {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.3); /* Maintain vertical centering during animation */
    visibility: visible;
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.section-completion-check.bounceIn {
  animation: checkmarkBounce 0.4s ease-out forwards; /* Keep original timing */
}

/* Hover effects - keep original */
.trans-menu-item:hover .section-completion-check.show {
  transform: translateY(-50%) scale(1.25); /* Keep original hover scale with vertical centering */
}

/* Responsive adjustments - keep original */
@media (max-width: 768px) {
  .section-completion-check {
    width: 14px;
    height: 14px;
    font-size: 9px;
    margin-left: 0; /* Remove margin for absolute positioning */
  }
  
  .section-completion-check i {
    font-size: 8px; /* Keep original mobile icon size */
  }
}

