/* Habit Tracker — Components Stylesheet (css/components.css) */

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--min-touch-target, 44px);
  padding: 0 var(--space-4, 16px);
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif);
  font-size: var(--font-size-md, 14px);
  font-weight: var(--font-weight-semibold, 600);
  border-radius: var(--radius-md, 12px);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast, 0.15s), transform var(--transition-fast, 0.15s);
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.btn-primary {
  background-color: var(--primary, #33513F);
  color: #FFFFFF;
}

.btn-secondary {
  background-color: var(--bg-surface-light, #F5F3EC);
  color: var(--text-primary, #1A1A1A);
}

/* Card Components */
.card {
  background-color: var(--bg-card, #FFFFFF);
  border-radius: var(--radius-md, 16px);
  padding: var(--space-4, 16px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  border: 1px solid var(--border-color, #E5E7EB);
}

/* ── Smart Rhythm Intelligence Components (Apple-minimal, restrained) ── */

.today-rhythm-container {
  margin: 12px 0 16px 0;
}

.today-rhythm-card {
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border, #E4E0D4);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.today-rhythm-card:active {
  transform: scale(0.99);
}

.rhythm-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rhythm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--primary, #33513F);
  background: rgba(51, 81, 63, 0.08);
  padding: 4px 10px;
  border-radius: 20px;
}

.rhythm-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary, #8A8570);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
}

.rhythm-close-btn:hover {
  color: var(--text-primary, #1A1A1A);
  background: rgba(0,0,0,0.05);
}

.rhythm-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary, #1A1A1A);
  margin: 0;
}

.rhythm-recommendation {
  font-size: 13px;
  color: var(--text-secondary, #6B7280);
  line-height: 1.4;
  margin: 0;
}

.rhythm-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.rhythm-why-btn {
  background: none;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary, #8A8570);
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 0;
}

.rhythm-why-btn:hover {
  color: var(--primary, #33513F);
}

.rhythm-cta-btn {
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--primary, #33513F);
  color: #FFFFFF;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
}

.rhythm-cta-btn:active {
  opacity: 0.85;
}

/* ── Evidence Drawer Modal ("Neden bunu öneriyoruz?") ── */
.rhythm-evidence-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10005;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.rhythm-evidence-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.rhythm-evidence-sheet {
  background: var(--bg-surface, #FFFFFF);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px 20px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rhythm-evidence-modal.active .rhythm-evidence-sheet {
  transform: translateY(0);
}

.evidence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.evidence-header h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary, #1A1A1A);
}

.evidence-stat-card {
  background: var(--bg-surface-light, #F8F7F2);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.evidence-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-primary, #1A1A1A);
}

.evidence-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--border, #E4E0D4);
  border-radius: 4px;
  overflow: hidden;
}

.evidence-bar-fill {
  height: 100%;
  background: var(--primary, #33513F);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.evidence-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.04);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #6B7280);
}

/* ── Habit Detail Rhythm Box ── */
.habit-detail-rhythm-box {
  background: var(--bg-surface, #FFFFFF);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border, #E4E0D4);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-rhythm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-primary, #1A1A1A);
}
