/* ===== BREATHING PRACTICES MODAL ===== */
/* Extends modal-base styles - only unique breathing modal styles */

/* Technique Selection */
.technique-selection {
  padding: 32px;
  overflow-y: auto;
  max-height: calc(90vh - 100px);
}

.technique-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.technique-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.technique-card:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.15);
}

.technique-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--brand);
  font-size: 24px;
}

.technique-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.technique-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.technique-duration {
  background: var(--brand-light);
  color: var(--brand);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* Breathing Practice Interface */
.breathing-practice {
  padding: 32px;
  text-align: center;
  overflow-y: auto;
  max-height: calc(90vh - 100px);
}

.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.practice-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.session-timer {
  font-size: 18px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-light);
  padding: 8px 16px;
  border-radius: 20px;
}

/* Breathing Circle Container */
.breathing-circle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 0;
  position: relative;
}

.phase-pill {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
  transition: all 0.3s ease;
  min-width: 100px;
  text-align: center;
}

.phase-pill.inhale {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.phase-pill.exhale {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.4);
}

.phase-pill.hold {
  background: linear-gradient(135deg, var(--accent) 0%, #f59e0b 100%);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Pattern Pill */
.pattern-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  color: var(--brand);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  margin: 8px 0 16px 0;
  border: 2px solid var(--brand);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
  text-align: center;
}

/* Breathing Circle */
.breathing-circle {
  width: 200px;
  height: 200px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.breathing-circle.inhale {
  transform: scale(1.3);
  border-color: #4ade80;
  box-shadow: 0 0 30px rgba(74, 222, 128, 0.3);
}

.breathing-circle.exhale {
  transform: scale(0.8);
  border-color: #60a5fa;
  box-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
}

.breathing-circle.hold {
  transform: scale(1.1);
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

/* Progress Ring */
.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

.progress-ring-circle {
  stroke: var(--brand);
  stroke-width: 4;
  stroke-linecap: round;
  fill: transparent;
  transition: stroke-dashoffset 0.1s ease-out, stroke 0.3s ease;
  opacity: 0.8;
}

/* Phase-specific progress ring colors that match breathing circle */
.breathing-circle.inhale .progress-ring-circle {
  stroke: #4ade80;
  opacity: 0.9;
}

.breathing-circle.exhale .progress-ring-circle {
  stroke: #60a5fa;
  opacity: 0.9;
}

.breathing-circle.hold .progress-ring-circle {
  stroke: var(--accent);
  opacity: 0.9;
}

/* Countdown Text */
.breath-count {
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
  position: relative;
}

/* Countdown colors for different phases */
.breathing-circle.inhale .breath-count {
  color: #22c55e;
  text-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.breathing-circle.exhale .breath-count {
  color: #3b82f6;
  text-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.breathing-circle.hold .breath-count {
  color: var(--accent);
  text-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.circle-inner {
  text-align: center;
}

/* Practice Controls */
.practice-controls {
  margin-top: 40px;
}

.progress-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 20px;
}

.cycle-counter {
  font-size: 16px;
  color: var(--muted);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  margin: 0 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-hover) 100%);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.control-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.control-btn {
  background: white;
  border: 2px solid var(--brand);
  color: var(--brand);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 20px;
}

.control-btn:hover {
  background: var(--brand);
  color: white;
  transform: scale(1.05);
}

.control-btn.paused {
  background: var(--brand);
  color: white;
}

.guidance-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* Technique Details */
.technique-details {
  margin-top: 32px;
  padding: 24px;
  background: rgba(5, 150, 105, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(5, 150, 105, 0.1);
  text-align: left;
}

.details-section {
  margin-bottom: 24px;
  text-align: left;
}

.details-section:last-child {
  margin-bottom: 0;
}

.details-section h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
  text-align: left;
}

.details-section p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  text-align: left;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.details-section ul,
.details-section ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
  text-align: left;
}

.details-section li {
  margin-bottom: 4px;
  text-align: left;
}

/* Responsive Design */
@media (max-width: 768px) {
  .technique-selection,
  .breathing-practice {
    padding: 24px 20px;
  }

  .technique-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .technique-card {
    padding: 20px 16px;
  }

  .practice-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .breathing-circle-container {
    margin: 32px 0;
  }

  .phase-pill {
    font-size: 12px;
    padding: 6px 16px;
    margin-bottom: 30px;
  }

  .pattern-pill {
    font-size: 12px;
    padding: 4px 12px;
    margin: 6px 0 12px 0;
  }

  .breathing-circle {
    width: 160px;
    height: 160px;
  }


  .breath-count {
    font-size: 36px;
  }


  .progress-section {
    flex-direction: column;
    gap: 16px;
    padding: 0;
  }

  .progress-bar {
    margin: 0;
    width: 100%;
  }

  .control-buttons {
    gap: 12px;
  }

  .control-btn {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .technique-details {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .technique-card {
    padding: 20px 16px;
  }

  .technique-card h3 {
    font-size: 16px;
  }

  .practice-header h3 {
    font-size: 20px;
  }

  .session-timer {
    font-size: 16px;
    padding: 6px 12px;
  }

  .breathing-circle {
    width: 140px;
    height: 140px;
  }


  .breath-count {
    font-size: 32px;
  }

  /* Enhanced progress ring visibility on mobile */
  .progress-ring-circle {
    stroke-width: 5;
    opacity: 0.9;
  }
  
  /* Maintain phase colors on mobile with better visibility */
  .breathing-circle.inhale .progress-ring-circle {
    stroke: #4ade80;
    opacity: 1;
  }

  .breathing-circle.exhale .progress-ring-circle {
    stroke: #60a5fa;
    opacity: 1;
  }

  .breathing-circle.hold .progress-ring-circle {
    stroke: var(--accent);
    opacity: 1;
  }

  .control-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
}