/*
 * RiseUpToHIV Milestone Tracking System — Styles
 * Copyright © 2026 RiseUpToHIV LLC. All rights reserved.
 * 
 * This code is proprietary and confidential.
 * Unauthorized copying, distribution, or use is strictly prohibited.
 * 
 * For licensing inquiries: kevin@riseuptohiv.com
 */

/* ============================================
   MILESTONE SYSTEM CSS
   Add to article inline styles or styles.css
   ============================================ */

/* ===== PROGRESS BAR (TOP OF PAGE) ===== */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #C62828, #E65100);
  z-index: 10000;
  transition: width 0.1s ease;
}

/* ===== MILESTONE TOAST NOTIFICATION ===== */
.milestone-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #C62828 0%, #8E0000 100%);
  color: #fff;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
  max-width: 380px;
  z-index: 9999;
  animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.milestone-toast.fade-out {
  animation: fadeOutDown 0.5s ease forwards;
}

@keyframes fadeOutDown {
  to {
    opacity: 0;
    transform: translateY(30px);
  }
}

/* Badge */
.milestone-badge {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Title */
.milestone-toast h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-family: var(--font-serif, 'Source Serif 4', serif);
  line-height: 1.2;
  font-weight: 600;
}

/* Message */
.milestone-toast p {
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 0.96;
  margin-bottom: 18px;
}

/* Progress Bar in Toast */
.milestone-progress {
  background: rgba(255,255,255,0.2);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.milestone-bar {
  background: #fff;
  height: 100%;
  border-radius: 5px;
  transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 12px rgba(255,255,255,0.6);
}

/* Count text */
.milestone-count {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 20px !important;
  font-weight: 500;
}

/* Action Buttons */
.milestone-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.milestone-btn-primary,
.milestone-btn-secondary {
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s;
  flex: 1;
  min-width: 120px;
}

.milestone-btn-primary {
  background: #fff;
  color: #C62828;
}

.milestone-btn-primary:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.milestone-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.milestone-btn-secondary:hover {
  background: rgba(255,255,255,0.25);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 520px) {
  .milestone-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    padding: 24px;
  }
  
  .milestone-toast h3 {
    font-size: 1.3rem;
  }
  
  .milestone-toast p {
    font-size: 0.9rem;
  }
  
  .milestone-actions {
    flex-direction: column;
  }
  
  .milestone-btn-primary,
  .milestone-btn-secondary {
    width: 100%;
    min-width: auto;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .milestone-toast {
    animation: none;
  }
  
  .milestone-bar {
    transition: none;
  }
  
  .reading-progress-bar {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .milestone-toast {
    border: 2px solid #fff;
  }
  
  .milestone-btn-secondary {
    border: 2px solid #fff;
  }
}

/* ===== SHARE BUTTONS ===== */
.milestone-share-section {
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.milestone-share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  flex: 1;
  min-width: 90px;
  justify-content: center;
}

.share-fb-small {
  background: #1877F2;
  color: #fff;
}

.share-x-small {
  background: #000;
  color: #fff;
}

.share-native-small {
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}

.share-download-small {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.share-social-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

@media (max-width: 520px) {
  .milestone-share-buttons {
    flex-direction: column;
  }
  
  .share-social-btn {
    width: 100%;
    min-width: auto;
  }
}
