/* ============================================
   Habit Consistency Calculator - Tool Styles
   Follows BE THE ONE design system
   ============================================ */

.hcc-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: 80px;
}

/* Hero */
.hcc-hero {
  text-align: center;
  padding: clamp(60px, 10vh, 120px) var(--container-padding) clamp(40px, 6vh, 80px);
  max-width: 800px;
  margin: 0 auto;
}

.hcc-hero-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 24px;
  padding: 8px 16px;
  border: 1px solid rgba(212, 168, 83, 0.25);
  border-radius: 4px;
}

.hcc-hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hcc-hero h1 span {
  color: var(--accent-gold);
}

.hcc-hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 16px;
}

/* Calculator Form */
.hcc-calc {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--container-padding) 40px;
}

.hcc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: clamp(24px, 4vw, 40px);
}

/* Input Group */
.hcc-group {
  margin-bottom: 28px;
}

.hcc-group:last-of-type {
  margin-bottom: 0;
}

.hcc-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hcc-label-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}

/* Slider */
.hcc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.hcc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 1px rgba(212, 168, 83, 0.3);
  transition: box-shadow 0.15s ease;
}

.hcc-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.2);
}

.hcc-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
}

.hcc-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Radio Group */
.hcc-radios {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hcc-radio {
  flex: 1;
  min-width: 80px;
}

.hcc-radio input {
  display: none;
}

.hcc-radio label {
  display: block;
  text-align: center;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.hcc-radio label:hover {
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

.hcc-radio input:checked + label {
  border-color: var(--accent-gold);
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  font-weight: 600;
}

/* Calculate Button */
.hcc-submit-row {
  margin-top: 32px;
  text-align: center;
}

.hcc-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: #0a0a0b;
  background: linear-gradient(135deg, var(--accent-gold), #c49b38);
  padding: 16px 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.3px;
  width: 100%;
  justify-content: center;
}

.hcc-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow-gold);
}

.hcc-submit-btn svg {
  width: 18px;
  height: 18px;
}

/* Results */
.hcc-results {
  display: none;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--container-padding) 40px;
  animation: hccSlideIn 0.4s ease;
}

.hcc-results.active {
  display: block;
}

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

/* Probability Display */
.hcc-prob-display {
  text-align: center;
  padding: 40px 0;
}

.hcc-prob-number {
  font-size: clamp(64px, 14vw, 100px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}

.hcc-prob-pct {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 300;
  opacity: 0.6;
}

.hcc-prob-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hcc-risk-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 4px;
  border: 1px solid;
}

/* Friction Driver */
.hcc-friction {
  padding: 20px 24px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-left: 3px solid #ef4444;
  border-radius: 8px;
  margin-top: 24px;
}

.hcc-friction h4 {
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hcc-friction p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Adjustments */
.hcc-adjustments {
  margin-top: 24px;
}

.hcc-adjustments h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.hcc-adjustment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hcc-adjustment-item:last-child {
  border-bottom: none;
}

.hcc-adjustment-icon {
  flex-shrink: 0;
  color: var(--accent-gold);
  margin-top: 2px;
}

/* Redesign Card */
.hcc-redesign {
  margin-top: 24px;
  padding: 24px;
  background: rgba(212, 168, 83, 0.05);
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 10px;
}

.hcc-redesign h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hcc-redesign-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hcc-redesign-stat {
  flex: 1;
  min-width: 120px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: 6px;
  text-align: center;
}

.hcc-redesign-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
}

.hcc-redesign-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hcc-redesign-prob {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.hcc-redesign-prob strong {
  color: #22c55e;
}

/* 7-Day Plan */
.hcc-plan {
  margin-top: 32px;
}

.hcc-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.hcc-plan-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.hcc-plan-focus {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 10px;
  background: var(--accent-gold-dim);
  border-radius: 4px;
}

.hcc-plan-day {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hcc-plan-day:hover {
  border-color: var(--border-color-hover);
}

.hcc-plan-day.open {
  border-color: var(--accent-gold);
}

.hcc-plan-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hcc-plan-day-title {
  font-size: 14px;
  font-weight: 600;
}

.hcc-plan-day-toggle {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.hcc-plan-day.open .hcc-plan-day-toggle {
  transform: rotate(180deg);
}

.hcc-plan-day-content {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.hcc-plan-day.open .hcc-plan-day-content {
  display: block;
}

.hcc-plan-item {
  margin-bottom: 12px;
}

.hcc-plan-item:last-child {
  margin-bottom: 0;
}

.hcc-plan-item-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.hcc-plan-item-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* CTA Row */
.hcc-cta-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hcc-cta-email {
  flex: 1;
  min-width: 240px;
}

.hcc-cta-email-form {
  display: flex;
  gap: 8px;
}

.hcc-cta-email-input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.hcc-cta-email-input:focus {
  border-color: var(--accent-gold);
}

.hcc-cta-email-input::placeholder {
  color: var(--text-muted);
}

.hcc-cta-email-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #0a0a0b;
  background: var(--accent-gold);
  border: none;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.hcc-cta-email-btn:hover {
  box-shadow: var(--glow-gold);
}

.hcc-cta-email-success {
  display: none;
  font-size: 14px;
  color: #22c55e;
  padding: 12px 0;
}

.hcc-cta-email-success.show {
  display: block;
}

.hcc-cta-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.hcc-cta-app:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  background: var(--bg-tertiary);
}

.hcc-cta-app svg {
  width: 16px;
  height: 16px;
}

/* Share Row */
.hcc-share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.hcc-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-color);
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hcc-share-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border-color-hover);
}

.hcc-share-btn.copied {
  color: #22c55e;
  border-color: #22c55e;
}

.hcc-share-btn svg {
  width: 14px;
  height: 14px;
}

/* Recalculate */
.hcc-recalc {
  text-align: center;
  margin-top: 24px;
}

.hcc-recalc-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hcc-recalc-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border-color-hover);
}

/* Content Sections */
.hcc-section {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(40px, 6vh, 80px) var(--container-padding);
  border-top: 1px solid var(--border-color);
}

.hcc-section h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  margin-bottom: 16px;
}

.hcc-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hcc-section ul {
  list-style: none;
  padding: 0;
}

.hcc-section li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hcc-section li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
}

/* FAQ */
.hcc-faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-color);
}

.hcc-faq-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.hcc-faq-q svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.hcc-faq-item.open .hcc-faq-q svg {
  transform: rotate(180deg);
}

.hcc-faq-a {
  display: none;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.hcc-faq-item.open .hcc-faq-a {
  display: block;
}

/* Related Tools */
.related-tools {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--container-padding) 40px;
}

.related-tools-header {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.related-tools-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.related-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.related-tool-link:hover {
  color: var(--accent-gold);
  border-color: rgba(212, 168, 83, 0.3);
}

.related-tool-link svg {
  width: 16px;
  height: 16px;
}

/* Responsive */
@media (max-width: 640px) {
  .hcc-radios {
    gap: 6px;
  }

  .hcc-radio label {
    padding: 10px 4px;
    font-size: 12px;
  }

  .hcc-cta-row {
    flex-direction: column;
  }

  .hcc-cta-email-form {
    flex-direction: column;
  }

  .hcc-redesign-row {
    flex-direction: column;
  }

  .hcc-plan-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
