/* ================================================================
   HealthyCalcs Calculators v2 – calculators.css
   Clean SaaS aesthetic. Inherits theme design tokens where possible.
================================================================ */

.hcc-calculator {
  --hcc-teal-1:   #e6faf7;
  --hcc-teal-3:   #4dd9c0;
  --hcc-teal-4:   #16b89e;
  --hcc-teal-5:   #0d9488;
  --hcc-teal-6:   #0a7a71;
  --hcc-teal-7:   #07615a;
  --hcc-cyan:     #06cef0;
  --hcc-gray-1:   #f8fafb;
  --hcc-gray-2:   #f0f4f5;
  --hcc-gray-3:   #e2eaec;
  --hcc-gray-5:   #607d8b;
  --hcc-gray-6:   #37474f;
  --hcc-gray-7:   #1c2b30;
  --hcc-white:    #ffffff;
  --hcc-radius:   10px;
  --hcc-radius-lg:18px;
  --hcc-shadow:   0 4px 20px rgba(13,148,136,.1), 0 1px 4px rgba(0,0,0,.05);
  --hcc-ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --hcc-font:     'DM Sans', system-ui, -apple-system, sans-serif;
}

/* Outer wrapper — NO grey box, seamlessly embedded */
.hcc-calculator {
  width: 100%;
  font-family: var(--hcc-font);
  font-size: 1rem;
  color: var(--hcc-gray-7);
  line-height: 1.6;
  box-sizing: border-box;
}

/* Inner card */
.hcc-inner {
  background: var(--hcc-white);
  border: 1px solid var(--hcc-gray-3);
  border-radius: var(--hcc-radius-lg);
  padding: 2.25rem;
  box-shadow: var(--hcc-shadow);
  position: relative;
  overflow: hidden;
}
.hcc-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hcc-teal-5), var(--hcc-cyan));
}

@media (max-width: 600px) {
  .hcc-inner { padding: 1.5rem 1.25rem; }
}

/* Title / desc */
.hcc-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--hcc-gray-7);
  margin: 0 0 .625rem;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.hcc-desc {
  color: var(--hcc-gray-5);
  font-size: .9rem;
  margin: 0 0 1.75rem;
  line-height: 1.6;
}

/* Fields */
.hcc-fields {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin-bottom: 1.5rem;
}
.hcc-field {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}
.hcc-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--hcc-gray-6);
  letter-spacing: .01em;
  display: block;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hcc-input,
.hcc-select,
.hcc-textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--hcc-gray-3);
  border-radius: var(--hcc-radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--hcc-gray-7);
  background: var(--hcc-white);
  box-sizing: border-box;
  transition: border-color .18s var(--hcc-ease), box-shadow .18s var(--hcc-ease);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.hcc-input:focus, .hcc-select:focus, .hcc-textarea:focus {
  border-color: var(--hcc-teal-5);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.hcc-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23607d8b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.75rem;
  cursor: pointer;
}

/* Radio group */
.hcc-radio-group {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .5rem 0;
}
.hcc-radio-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: var(--hcc-gray-6);
  cursor: pointer;
  font-weight: 500;
}
.hcc-radio-label input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--hcc-teal-5);
  cursor: pointer;
}

/* Range */
.hcc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: var(--hcc-gray-3);
  border-radius: 3px;
  outline: none;
  margin: .5rem 0;
}
.hcc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--hcc-teal-5);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(13,148,136,.4);
  transition: transform .15s var(--hcc-ease);
}
.hcc-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.hcc-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--hcc-teal-5);
  cursor: pointer;
  border: none;
}

/* Button */
.hcc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .875rem 1.5rem;
  border: none;
  border-radius: var(--hcc-radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .18s var(--hcc-ease), box-shadow .18s var(--hcc-ease), background .18s var(--hcc-ease);
  letter-spacing: -.01em;
}
.hcc-btn--calculate {
  background: var(--hcc-teal-5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(13,148,136,.35);
  margin-top: .375rem;
}
.hcc-btn--calculate:hover  {
  background: var(--hcc-teal-6);
  box-shadow: 0 8px 20px rgba(13,148,136,.45);
  transform: translateY(-1px);
}
.hcc-btn--calculate:active { transform: translateY(0); }
.hcc-btn--secondary {
  background: var(--hcc-gray-1);
  color: var(--hcc-gray-6);
  border: 1.5px solid var(--hcc-gray-3);
}
.hcc-btn--secondary:hover { background: var(--hcc-gray-2); }

/* Results */
.hcc-results {
  margin-top: 1.625rem;
  padding: 1.625rem;
  background: linear-gradient(135deg, var(--hcc-teal-1) 0%, rgba(230,250,247,.4) 100%);
  border: 1.5px solid var(--hcc-teal-3);
  border-radius: var(--hcc-radius-lg);
  animation: hccFadeIn .35s ease forwards;
}
@keyframes hccFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hcc-results__heading {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--hcc-teal-6);
  text-align: center;
  margin: 0 0 1.125rem;
}
.hcc-result-row {
  text-align: center;
  font-size: .95rem;
  color: var(--hcc-gray-6);
  margin: .625rem 0;
}
.hcc-result-value {
  color: var(--hcc-teal-5);
  font-weight: 800;
  font-size: 1.05rem;
}

/* Progress bar */
.hcc-progress-bar {
  background: rgba(255,255,255,.6);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin: .625rem 0;
}
.hcc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hcc-teal-4), var(--hcc-cyan));
  border-radius: 999px;
  transition: width .5s var(--hcc-ease);
}

/* Mood buttons */
.hcc-mood-grid {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hcc-mood-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--hcc-gray-3);
  background: var(--hcc-white);
  font-size: 1.25rem;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hcc-mood-btn:hover, .hcc-mood-btn.selected {
  border-color: var(--hcc-teal-5);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(13,148,136,.25);
}

/* Breathing circle */
.hcc-breathing-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--hcc-teal-1);
  border: 3px solid var(--hcc-teal-4);
  margin: 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hcc-teal-6);
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  letter-spacing: .02em;
}
.hcc-breathing-circle.inhale { transform: scale(1.22); }
.hcc-breathing-circle.exhale { transform: scale(0.82); }

/* Timer */
.hcc-timer {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--hcc-teal-5);
  text-align: center;
  letter-spacing: -.03em;
  margin: .25rem 0 1rem;
}

/* Posture pulse dot */
.hcc-pulse-dot {
  width: 14px; height: 14px;
  background: var(--hcc-cyan);
  border-radius: 50%;
  display: inline-block;
  animation: hccPulse 1.6s ease-in-out infinite;
}
@keyframes hccPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6,206,240,.5); }
  50%       { box-shadow: 0 0 0 10px rgba(6,206,240,0); }
}

/* Tags (snack planner) */
.hcc-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.hcc-tag {
  padding: .35rem .875rem;
  background: var(--hcc-gray-1);
  color: var(--hcc-gray-6);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--hcc-gray-3);
  transition: all .15s var(--hcc-ease);
}
.hcc-tag:hover { border-color: var(--hcc-teal-4); color: var(--hcc-teal-6); background: var(--hcc-teal-1); }
.hcc-tag.selected { border-color: var(--hcc-teal-5); background: var(--hcc-teal-1); color: var(--hcc-teal-6); }

/* Stress questions */
.hcc-stress-q { margin-bottom: 1.25rem; }
.hcc-stress-q p { font-size: .875rem; font-weight: 600; color: var(--hcc-gray-7); margin-bottom: .5rem; }

/* Alert boxes */
.hcc-alert {
  padding: .875rem 1rem;
  border-radius: var(--hcc-radius);
  font-size: .875rem;
  margin-top: .875rem;
  line-height: 1.5;
}
.hcc-alert--info    { background: #eff6ff; border-left: 3px solid #3b82f6; color: #1e40af; }
.hcc-alert--warning { background: #fefce8; border-left: 3px solid #eab308; color: #713f12; }
.hcc-alert--danger  { background: #fef2f2; border-left: 3px solid #ef4444; color: #991b1b; }
.hcc-alert--success { background: var(--hcc-teal-1); border-left: 3px solid var(--hcc-teal-4); color: var(--hcc-teal-6); }

/* Share button */
.hcc-share { text-align: center; margin-top: 1rem; }
.hcc-share-btn {
  background: none;
  border: 1.5px solid var(--hcc-teal-4);
  color: var(--hcc-teal-5);
  padding: .5rem 1.375rem;
  border-radius: var(--hcc-radius);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s var(--hcc-ease), transform .18s var(--hcc-ease);
}
.hcc-share-btn:hover { background: var(--hcc-teal-1); transform: translateY(-1px); }

/* Disclaimer */
.hcc-disclaimer {
  margin-top: 1.375rem;
  font-size: .775rem;
  color: var(--hcc-gray-5);
  text-align: center;
  line-height: 1.55;
  padding-top: 1rem;
  border-top: 1px solid var(--hcc-gray-3);
}

/* Error */
.hcc-error {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  padding: .875rem 1rem;
  border-radius: var(--hcc-radius);
  font-size: .9rem;
}

/* ---- Calculator LIST shortcode grid ---- */
.hcc-calc-list { display: grid; gap: 1.25rem; margin: 1rem 0; }
.hcc-cols-1 { grid-template-columns: 1fr; }
.hcc-cols-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hcc-cols-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.hcc-calc-card {
  background: #fff;
  border: 1px solid var(--hcc-gray-3);
  border-radius: var(--hcc-radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: box-shadow .2s var(--hcc-ease), transform .2s var(--hcc-ease), border-color .2s var(--hcc-ease);
  position: relative;
  overflow: hidden;
}
.hcc-calc-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hcc-teal-4), var(--hcc-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--hcc-ease);
}
.hcc-calc-card:hover { box-shadow: 0 8px 24px rgba(13,148,136,.12); transform: translateY(-2px); border-color: var(--hcc-teal-3); }
.hcc-calc-card:hover::after { transform: scaleX(1); }
.hcc-calc-card__title { font-size: 1rem; font-weight: 700; color: var(--hcc-gray-7); margin: 0; letter-spacing: -.01em; }
.hcc-calc-card__desc  { font-size: .85rem; color: var(--hcc-gray-5); flex: 1; margin: 0; line-height: 1.55; }
.hcc-calc-card__btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  align-self: flex-start;
  padding: .45rem 1rem;
  border: 1.5px solid var(--hcc-teal-5);
  border-radius: 6px;
  color: var(--hcc-teal-5);
  font-size: .825rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.hcc-calc-card__btn:hover { background: var(--hcc-teal-1); }

/* Calorie counter list */
.hcc-food-list { list-style: none; padding: 0; margin: 0; }
.hcc-food-list li { padding: .4rem 0; border-bottom: 1px solid var(--hcc-gray-3); font-size: .875rem; color: var(--hcc-gray-6); }

/* Nutrient table */
.hcc-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.hcc-table th, .hcc-table td { padding: .5rem .75rem; border: 1px solid var(--hcc-gray-3); text-align: left; }
.hcc-table th { background: var(--hcc-gray-1); font-weight: 700; color: var(--hcc-gray-6); }
