/* Calculator specific styles - Mobile-first */

.calculator-wrapper {
  max-width: 600px;
  margin: 2rem auto;
}

.calculator-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--shadow);
  padding: 2rem;
}

.calculator-header {
  text-align: center;
  margin-bottom: 2rem;
}

.calculator-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

/* Form */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.form-input {
  padding: 0.875rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  min-height: 44px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-select {
  padding: 0.875rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s;
  min-height: 44px;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Radio buttons for gender */
.radio-group {
  display: flex;
  gap: 1rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  flex: 1;
  justify-content: center;
  min-height: 44px;
}

.radio-label:hover {
  border-color: var(--primary-light);
  background: rgba(76, 175, 80, 0.05);
}

.radio-label input[type="radio"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.radio-label input[type="radio"]:checked {
  outline: 2px solid var(--primary);
}

.radio-label:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: rgba(76, 175, 80, 0.1);
}

/* Submit Button */
.calc-submit {
  background: var(--primary);
  color: var(--white);
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
  min-height: 48px;
}

.calc-submit:hover {
  background: var(--primary-dark);
}

.calc-submit:active {
  transform: scale(0.98);
}

/* Results */
.calc-results {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
  display: none;
}

.calc-results.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

.results-title {
  text-align: center;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.result-card {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.result-card.highlight {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: var(--white);
  border-left-color: var(--primary-dark);
}

.result-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  opacity: 0.9;
}

.result-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.result-card.highlight .result-label,
.result-card.highlight .result-value {
  color: var(--white);
}

.result-description {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* Macros Section */
.macros-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.macros-title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-dark);
}

.macro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.macro-item {
  background: var(--white);
  border: 2px solid var(--border);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.macro-name {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.macro-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.macro-percentage {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* CTA after results */
.results-cta {
  margin-top: 2rem;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  color: var(--white);
}

.results-cta h3 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.results-cta p {
  margin-bottom: 1.25rem;
  opacity: 0.95;
}

/* Related Articles */
.related-articles {
  margin-top: 3rem;
}

.related-articles h3 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.article-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.article-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow);
  transform: translateY(-2px);
}

.article-title {
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.article-excerpt {
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Tablet */
@media (min-width: 768px) {
  .calculator-card {
    padding: 2.5rem;
  }

  .macro-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .result-value {
    font-size: 2rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .calculator-wrapper {
    max-width: 700px;
  }
}
