/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: Child theme for GeneratePress
Author: Your Name
Template: generatepress
Version: 1.0
*/

/* ============================
   Stylish BMI Calculator CSS
   Compatible with your shortcode
   ============================ */

/* BMI Calculator Responsive Fix & Style */
.lf-bmi-wrapper {
  max-width: 450px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-family: 'Inter', sans-serif;
}

.lf-bmi-wrapper h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: #111;
}

/* Tabs */
.bmi-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.bmi-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
  cursor: pointer;
  background-color: #f6f6f6;
}
.bmi-tab.active {
  background-color: #2a73ff;
  color: #fff;
  border-color: #2a73ff;
}

/* Input fields layout */
.bmi-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.bmi-input-row input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
}

/* Gender & Age responsive fix */
.bmi-input-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.bmi-input-group label {
  font-size: 14px;
  color: #444;
  margin-right: 6px;
}
.bmi-input-group input[type="number"] {
  width: 100%;
}

/* Buttons */
.bmi-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 12px 0;
}
.bmi-buttons button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.bmi-buttons .calculate-btn {
  background-color: #2a73ff;
  color: #fff;
}
.bmi-buttons .clear-btn {
  background-color: #e0e0e0;
}

/* Result Section */
.bmi-result {
  text-align: center;
  margin-top: 1.2rem;
  transition: color 0.3s ease;
}
.bmi-result h4 {
  font-size: 18px;
  margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .bmi-input-row {
    flex-direction: column;
  }
  .bmi-input-row input {
    width: 100%;
  }
  .bmi-input-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Gauge Chart */
/* ✅ BMI Gauge Chart - Full 180° semi-circle */
.bmi-chart {
  position: relative;
  width: 240px;
  height: 120px;
  margin: 1.5rem auto;
  overflow: hidden;
  border-top: 3px solid #eee;
  border-radius: 240px 240px 0 0 / 240px 240px 0 0;
}

/* Background colors (Underweight → Normal → Overweight → Obese) */
.bmi-chart::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    #4da3ff 0deg 45deg,    /* Blue: Underweight */
    #28a745 45deg 90deg,   /* Green: Normal */
    #ffcc00 90deg 135deg,  /* Yellow: Overweight */
    #ff4d4d 135deg 180deg  /* Red: Obese */
  );
  clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%);
}

/* Needle styling */
.bmi-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 3px;
  height: 120px;
  background: #000;
  transform-origin: bottom center;
  transform: rotate(180deg); /* Start from left side */
  transition: transform 0.6s ease-in-out;
}

/* Inline validation messages */
.error-msg {
  display: block;
  color: #ff4d4d;
  font-size: 13px;
  margin-top: 4px;
}


