/* ADHD Features - WhisperPlan SEO Tools
   Modular CSS for ADHD-specific components and accessibility
   =========================================================== */

/* ADHD Mode Toggle */
.adhd-mode-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #ff9500 0%, #ffcc00 100%);
  border: none;
  border-radius: 25px;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
  transition: all 0.2s ease;
}

.adhd-mode-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.adhd-mode-toggle .toggle-icon {
  font-size: 1.25rem;
}

/* Focus Mode Overlay */
.focus-mode-active {
  position: relative;
}

.focus-mode-active::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 50;
  pointer-events: none;
}

.focus-mode-active .focused-element {
  position: relative;
  z-index: 60;
  box-shadow: 0 0 0 4px #ff9500, 0 0 40px rgba(255, 149, 0, 0.3);
}

/* ADHD Timer Component */
.adhd-timer {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.1) 0%, rgba(255, 204, 0, 0.05) 100%);
  border: 2px solid rgba(255, 149, 0, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.adhd-timer .timer-display {
  font-size: 4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #ff9500 0%, #ffcc00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.adhd-timer .timer-label {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}

.adhd-timer .timer-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.adhd-timer .timer-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.adhd-timer .timer-btn.start {
  background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
  color: white;
}

.adhd-timer .timer-btn.pause {
  background: linear-gradient(135deg, #ff9500 0%, #ffcc00 100%);
  color: #333;
}

.adhd-timer .timer-btn.reset {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text);
}

/* Pomodoro Preset Buttons */
.pomodoro-presets {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pomodoro-preset {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 149, 0, 0.3);
  background: transparent;
  color: var(--color-text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pomodoro-preset:hover,
.pomodoro-preset.active {
  border-color: #ff9500;
  background: rgba(255, 149, 0, 0.15);
}

/* ADHD Challenge Card */
.adhd-challenge-card {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.1) 0%, rgba(255, 204, 0, 0.05) 100%);
  border: 1px solid rgba(255, 149, 0, 0.4);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.adhd-challenge-card .challenge-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.adhd-challenge-card .challenge-icon {
  font-size: 1.5rem;
}

.adhd-challenge-card .challenge-title {
  font-weight: 600;
  font-size: 1rem;
  color: #ff9500;
}

.adhd-challenge-card .challenge-text {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.adhd-challenge-card .solution {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(52, 199, 89, 0.1);
  border-radius: 8px;
}

.adhd-challenge-card .solution::before {
  content: '✅';
}

.adhd-challenge-card .solution-text {
  font-size: 0.9rem;
  color: #34c759;
  font-weight: 500;
}

/* Brain Dump Section */
.brain-dump {
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(255, 149, 0, 0.4);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.brain-dump h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.brain-dump h3::before {
  content: '🧠';
}

.brain-dump textarea {
  width: 100%;
  min-height: 150px;
  padding: 1rem;
  border: 1px solid rgba(255, 149, 0, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text);
  font-size: 1rem;
  resize: vertical;
}

.brain-dump textarea::placeholder {
  color: #666;
  font-style: italic;
}

.brain-dump textarea:focus {
  outline: none;
  border-color: #ff9500;
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15);
}

/* Energy Level Indicator */
.energy-indicator {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.energy-indicator .label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

.energy-level {
  display: flex;
  gap: 0.25rem;
}

.energy-bar {
  width: 30px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.energy-bar.low { background: #ff3b30; }
.energy-bar.med-low { background: #ff9500; }
.energy-bar.medium { background: #ffcc00; }
.energy-bar.med-high { background: #34c759; }
.energy-bar.high { background: #30d158; }

.energy-bar:hover,
.energy-bar.selected {
  transform: scaleY(1.2);
  border-color: white;
}

/* Progress Celebration */
.celebration-banner {
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.2) 0%, rgba(48, 209, 88, 0.1) 100%);
  border: 2px solid #34c759;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  animation: celebratePulse 2s ease-in-out infinite;
}

@keyframes celebratePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(52, 199, 89, 0); }
}

.celebration-banner .celebration-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
}

.celebration-banner .celebration-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #34c759;
}

.celebration-banner .celebration-subtext {
  font-size: 0.9rem;
  color: #888;
  margin-top: 0.25rem;
}

/* Distraction Parking Lot */
.distraction-parking {
  background: rgba(88, 86, 214, 0.1);
  border: 1px solid rgba(88, 86, 214, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.distraction-parking h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #5856d6;
}

.distraction-parking h4::before {
  content: '🅿️';
}

.distraction-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.distraction-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 0.9rem;
}

.distraction-item .dismiss-btn {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 59, 48, 0.2);
  color: #ff3b30;
  cursor: pointer;
  font-size: 0.7rem;
}

.distraction-input {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.distraction-input input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(88, 86, 214, 0.3);
  border-radius: 6px;
  background: transparent;
  color: var(--color-text);
}

.distraction-input input:focus {
  outline: none;
  border-color: #5856d6;
}

.distraction-input button {
  padding: 0.5rem 0.75rem;
  background: #5856d6;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}

/* Motivation Quote */
.motivation-quote {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.motivation-quote::before {
  content: '"';
  font-size: 4rem;
  color: rgba(102, 126, 234, 0.2);
  position: absolute;
  top: 0;
  left: 1rem;
  line-height: 1;
}

.motivation-quote .quote-text {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 0.5rem;
  position: relative;
}

.motivation-quote .quote-author {
  font-size: 0.85rem;
  color: #888;
}

.motivation-quote .refresh-quote {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  color: var(--color-text);
  font-size: 0.8rem;
  cursor: pointer;
}

/* ADHD-Friendly Navigation Hints */
.adhd-nav-hint {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  z-index: 90;
  animation: fadeInOut 5s ease-in-out;
  pointer-events: none;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; transform: translateY(10px); }
  10%, 90% { opacity: 1; transform: translateY(0); }
}

/* Body Doubling Session Indicator */
.body-doubling-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(52, 199, 89, 0.15);
  border: 1px solid #34c759;
  border-radius: 20px;
  font-size: 0.85rem;
}

.body-doubling-indicator .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ============================================
   Script.js Integration Styles
   These classes match the dynamically created elements
   ============================================ */

/* Focus Mode Toggle Button (created by initFocusMode) */
.adhd-focus-toggle {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  padding: 10px 20px;
  background: rgba(102, 126, 234, 0.2);
  border: 2px solid rgb(102, 126, 234);
  border-radius: 8px;
  color: rgb(102, 126, 234);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.adhd-focus-toggle:hover {
  background: rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Focus Mode Active State */
body.adhd-focus-active::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 500;
  pointer-events: none;
  animation: fadeIn 0.3s ease;
}

body.adhd-focus-active .calculator-widget,
body.adhd-focus-active .schedule-container,
body.adhd-focus-active .template-form,
body.adhd-focus-active .planner-container {
  position: relative;
  z-index: 600;
  box-shadow: 0 0 0 4px #667eea, 0 0 60px rgba(102, 126, 234, 0.5);
  animation: focusPulse 2s ease-in-out infinite;
}

@keyframes focusPulse {
  0%, 100% { box-shadow: 0 0 0 4px #667eea, 0 0 60px rgba(102, 126, 234, 0.5); }
  50% { box-shadow: 0 0 0 6px #667eea, 0 0 80px rgba(102, 126, 234, 0.7); }
}

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

/* Pomodoro Timer (circular) */
.adhd-timer {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 16px;
  padding: 2rem;
  margin: 1.5rem 0;
  text-align: center;
}

.adhd-timer-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(102, 126, 234, 0.8);
  margin-bottom: 1.5rem;
}

.adhd-timer-circle {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.adhd-timer-svg {
  transform: rotate(-90deg);
}

.adhd-timer-circle-bg {
  fill: none;
  stroke: rgba(102, 126, 234, 0.2);
  stroke-width: 10;
}

.adhd-timer-circle-progress {
  fill: none;
  stroke: url(#timerGradient), #667eea;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.adhd-timer-display {
  font-size: 3.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.adhd-timer-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.adhd-timer-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.adhd-timer-btn.start {
  background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
  color: white;
}

.adhd-timer-btn.start:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(52, 199, 89, 0.4);
}

.adhd-timer-btn.pause {
  background: linear-gradient(135deg, #ff9500 0%, #ffcc00 100%);
  color: #333;
}

.adhd-timer-btn.pause:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 149, 0, 0.4);
}

.adhd-timer-btn.reset {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text, #fff);
}

.adhd-timer-btn.reset:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Encouragement Notification Animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.adhd-encouragement {
  animation: slideInRight 0.3s ease forwards;
}

/* Auto-save Indicator */
.template-autosave {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.template-autosave.saved {
  color: #34c759;
}

.template-autosave.saving {
  color: #ff9500;
}

/* Points Display Badge */
.adhd-points-badge {
  position: fixed;
  top: 140px;
  right: 20px;
  z-index: 999;
  background: linear-gradient(135deg, #ff9500 0%, #ffcc00 100%);
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.adhd-points-badge .star {
  font-size: 1.1rem;
}

/* Achievement Unlock Animation */
@keyframes achievementPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.achievement-unlocked {
  animation: achievementPop 0.5s ease-out;
}

/* Quick Capture Styles */
.quick-capture {
  background: rgba(102, 126, 234, 0.1);
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.quick-capture:hover {
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(102, 126, 234, 0.15);
}

.quick-capture-input {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text, #fff);
  text-align: center;
}

.quick-capture-input::placeholder {
  color: #888;
}

.quick-capture-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.5);
}

/* Streak Counter */
.streak-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(255, 69, 58, 0.15) 0%, rgba(255, 149, 0, 0.15) 100%);
  border: 1px solid rgba(255, 149, 0, 0.3);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.streak-counter .fire {
  font-size: 1.2rem;
}

.streak-counter .count {
  color: #ff9500;
}

/* Responsive */
@media (max-width: 768px) {
  .adhd-mode-toggle {
    bottom: 10px;
    right: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  .adhd-focus-toggle {
    top: auto;
    bottom: 60px;
    right: 10px;
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  
  .adhd-timer .timer-display,
  .adhd-timer-display {
    font-size: 2.5rem;
  }
  
  .adhd-timer-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .adhd-timer-btn {
    justify-content: center;
  }
  
  .pomodoro-presets {
    flex-direction: column;
    align-items: stretch;
  }
  
  .energy-bar {
    width: 25px;
    height: 18px;
  }
  
  .adhd-points-badge {
    top: auto;
    bottom: 110px;
    right: 10px;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .adhd-encouragement {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}
