/* ============================================================
   Holistic HealthEdge — Calculator Pages Styles
   Shared styles for Calories, BMI & Water Intake Calculators
   ============================================================ */

/* ── Calculator Hero ──────────────────────────────────────── */
.calc-hero {
  padding: 3.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.calc-hero--calories { background: #0891b2; }
.calc-hero--bmi { background: #0891b2; }
.calc-hero--water { background: #0891b2; }

.calc-hero__icon {
  width: 64px; height: 64px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem; color: #fff;
  backdrop-filter: blur(4px);
}
.calc-hero__title {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: #fff; margin-bottom: .5rem; line-height: 1.2;
}
.calc-hero__sub {
  color: rgba(255,255,255,.85);
  font-size: clamp(.85rem, 2vw, 1.05rem);
  max-width: 550px; margin: 0 auto; line-height: 1.6;
}

/* ── Calculator Card ─────────────────────────────────────── */
.calc-section { padding: 3rem 0; }
.calc-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}
.calc-card__title {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 1.3rem; color: #1e40af;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: .5rem;
}
.calc-card__title i { color: #059669; }

/* ── Form Elements ───────────────────────────────────────── */
.calc-form { display: flex; flex-direction: column; gap: 1rem; }
.calc-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.calc-form__group { display: flex; flex-direction: column; gap: .35rem; }
.calc-form__group--full { grid-column: 1 / -1; }
.calc-form__label {
  font-size: .85rem; font-weight: 600; color: #374151;
}
.calc-form__label span { color: #dc2626; }
.calc-form__input,
.calc-form__select {
  width: 100%; box-sizing: border-box;
  padding: .6rem .85rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: .9rem; font-family: inherit;
  transition: border-color .25s ease;
  background: #fff;
}
.calc-form__input:focus,
.calc-form__select:focus {
  outline: none; border-color: #059669;
}
.calc-form__select { cursor: pointer; appearance: auto; }

/* Radio Group */
.calc-form__radio-group {
  display: flex; gap: .75rem; flex-wrap: wrap;
}
.calc-form__radio {
  display: flex; align-items: center; gap: .35rem;
  padding: .45rem .85rem;
  border: 2px solid #e5e7eb; border-radius: 8px;
  cursor: pointer; font-size: .85rem; font-weight: 500;
  transition: all .25s ease;
}
.calc-form__radio:has(input:checked) {
  border-color: #059669; background: #e8f5ee; color: #065f46;
}
.calc-form__radio input { accent-color: #059669; }

/* Submit Button */
.calc-btn {
  padding: .75rem 1.5rem;
  background: #059669; color: #fff;
  border: none; border-radius: 8px;
  font-size: .95rem; font-weight: 600;
  font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: background .25s ease;
  width: 100%;
}
.calc-btn:hover { background: #047857; }
.calc-btn i { font-size: .85rem; }

/* ── Result Card ─────────────────────────────────────────── */
.calc-result {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f5ee, #e8f0fb);
  border: 1px solid #d1fae5;
}
.calc-result.show { display: block; animation: fadeUp .4s ease; }

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

.calc-result__heading {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 1.1rem; color: #065f46;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .4rem;
}
.calc-result__main {
  text-align: center; margin-bottom: 1rem;
}
.calc-result__number {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 2.5rem; font-weight: 700;
  color: #059669; line-height: 1;
}
.calc-result__unit {
  font-size: .85rem; color: #6b7280; margin-top: .25rem;
}
.calc-result__category {
  display: inline-block;
  padding: .3rem .85rem;
  border-radius: 20px;
  font-size: .82rem; font-weight: 600;
  margin-top: .5rem;
}
.calc-result__category--underweight { background: #fef3c7; color: #92400e; }
.calc-result__category--normal { background: #d1fae5; color: #065f46; }
.calc-result__category--overweight { background: #fed7aa; color: #9a3412; }
.calc-result__category--obese { background: #fecaca; color: #991b1b; }

/* Result Details Grid */
.calc-result__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.calc-result__detail {
  background: #fff;
  border-radius: 8px;
  padding: .75rem;
  text-align: center;
  border: 1px solid #e5e7eb;
}
.calc-result__detail-value {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 1.25rem; font-weight: 700; color: #1e40af;
}
.calc-result__detail-label {
  font-size: .72rem; color: #6b7280; margin-top: .15rem;
}

/* Tips Section */
.calc-result__tips {
  margin-top: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.calc-result__tips-title {
  font-size: .9rem; font-weight: 600; color: #1e40af;
  margin-bottom: .5rem;
  display: flex; align-items: center; gap: .35rem;
}
.calc-result__tips ul {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: .35rem;
}
.calc-result__tips li {
  font-size: .82rem; color: #374151;
  padding-left: 1.1rem; position: relative;
  line-height: 1.5;
}
.calc-result__tips li::before {
  content: '✓'; position: absolute; left: 0;
  color: #059669; font-weight: 700;
}

/* ── Info Section ────────────────────────────────────────── */
.calc-info {
  padding: 3rem 0;
  background: #f7f9f7;
}
.calc-info__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 900px; margin: 0 auto;
}
.calc-info__card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  text-align: center;
}
.calc-info__card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .75rem;
  font-size: 1.2rem; color: #fff;
}
.calc-info__card-icon--green { background: #059669; }
.calc-info__card-icon--blue { background: #1e40af; }
.calc-info__card-icon--purple { background: #7c3aed; }
.calc-info__card-title {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 1rem; color: #1f2937; margin-bottom: .35rem;
}
.calc-info__card-text {
  font-size: .82rem; color: #6b7280; line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 680px) {
  .calc-hero { padding: 2rem 0; }
  .calc-hero__icon { width: 48px; height: 48px; font-size: 1.2rem; }
  .calc-section { padding: 1.5rem 0; }
  .calc-card { padding: 1.25rem; border-radius: 12px; }
  .calc-card__title { font-size: 1.1rem; }
  .calc-form__row { grid-template-columns: 1fr; }
  .calc-form__radio-group { flex-direction: column; }
  .calc-form__radio { justify-content: center; }
  .calc-result { padding: 1rem; }
  .calc-result__number { font-size: 2rem; }
  .calc-result__details { grid-template-columns: 1fr 1fr; }
  .calc-info { padding: 1.5rem 0; }
  .calc-info__grid { grid-template-columns: 1fr; }
  .calc-detail { padding: 1.5rem 0; }
  .calc-detail__grid { grid-template-columns: 1fr; }
  .calc-detail__step { flex-direction: column; gap: .5rem; }
  .calc-detail__step-num { width: 36px; height: 36px; font-size: .85rem; }
  .calc-detail__formula { font-size: .82rem; }
  .calc-detail__table-row { flex-direction: column; gap: .15rem; }
  .calc-detail__card { padding: 1rem; }
  .calc-faq__item summary { font-size: .88rem; }
  .calc-faq__item p { font-size: .82rem; }
}

@media (max-width: 380px) {
  .calc-card { padding: 1rem; }
  .calc-form__input,
  .calc-form__select { padding: .5rem .65rem; font-size: .85rem; }
  .calc-result__details { grid-template-columns: 1fr; }
}

/* ── Detail Sections ─────────────────────────────────────── */
.calc-detail { padding: 3rem 0; }
.calc-detail--alt { background: #f7f9f7; }

.calc-detail__header {
  text-align: center; margin-bottom: 2rem;
}
.calc-detail__header .section-heading {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 1.5rem; color: #1f2937; margin-bottom: .35rem;
}
.calc-detail__header .section-subheading {
  font-size: .9rem; color: #6b7280; max-width: 600px; margin: 0 auto; line-height: 1.6;
}

/* Steps */
.calc-detail__steps {
  display: flex; flex-direction: column; gap: 1.25rem;
  max-width: 700px; margin: 0 auto;
}
.calc-detail__step {
  display: flex; gap: 1rem; align-items: flex-start;
}
.calc-detail__step-num {
  width: 40px; height: 40px; flex-shrink: 0;
  background: #059669; color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 1rem; font-weight: 700;
}
.calc-detail__step-body h3 {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 1.05rem; color: #1f2937; margin-bottom: .35rem;
}
.calc-detail__step-body p {
  font-size: .88rem; color: #4b5563; line-height: 1.65;
}

/* Formula Box */
.calc-detail__formula {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  padding: .75rem 1rem; margin-top: .5rem;
  font-size: .88rem; line-height: 1.8; color: #1f2937;
}

/* Table */
.calc-detail__table {
  margin-top: .5rem; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden;
}
.calc-detail__table-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem .85rem; font-size: .85rem;
  border-bottom: 1px solid #f3f4f6;
}
.calc-detail__table-row:last-child { border-bottom: none; }
.calc-detail__table-row:nth-child(even) { background: #f9fafb; }
.calc-detail__table-row span:last-child { font-weight: 600; color: #059669; }

/* Cards Grid */
.calc-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem; max-width: 900px; margin: 0 auto;
}
.calc-detail__card {
  background: #fff; border-radius: 12px;
  padding: 1.5rem; border: 1px solid #e5e7eb;
  text-align: center;
}
.calc-detail__card h3 {
  font-family: 'Ubuntu', Georgia, serif;
  font-size: 1.05rem; color: #1f2937; margin-bottom: .25rem;
}
.calc-detail__card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .65rem; font-size: 1.2rem;
}
.calc-detail__card-val {
  font-size: .85rem; font-weight: 600; color: #059669; margin-bottom: .35rem;
}
.calc-detail__card p {
  font-size: .82rem; color: #6b7280; line-height: 1.6; margin-bottom: .5rem;
}
.calc-detail__card ul {
  list-style: none; padding: 0; text-align: left;
}
.calc-detail__card li {
  font-size: .78rem; color: #4b5563; padding: .2rem 0 .2rem 1.1rem;
  position: relative; line-height: 1.5;
}
.calc-detail__card li::before {
  content: '•'; position: absolute; left: 0; color: #059669; font-weight: 700;
}

/* ── FAQ Section ────────────────────────────────────────── */
.calc-faq { padding: 3rem 0; background: #f7f9f7; }
.calc-faq__list {
  max-width: 700px; margin: 0 auto;
  display: flex; flex-direction: column; gap: .65rem;
}
.calc-faq__item {
  background: #fff; border-radius: 10px;
  border: 1px solid #e5e7eb; overflow: hidden;
}
.calc-faq__item summary {
  padding: .85rem 1.15rem;
  font-size: .92rem; font-weight: 600; color: #1f2937;
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.calc-faq__item summary::after {
  content: '+'; font-size: 1.2rem; font-weight: 300; color: #059669;
  transition: transform .25s ease;
}
.calc-faq__item[open] summary::after {
  content: '−'; transform: rotate(180deg);
}
.calc-faq__item summary::-webkit-details-marker { display: none; }
.calc-faq__item p {
  padding: 0 1.15rem .85rem;
  font-size: .85rem; color: #4b5563; line-height: 1.7;
}
.calc-faq__item[open] {
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(5,150,105,.1);
}
