/* Basic visibility helper */
#ghe-cfm-calculator [hidden] {
  display: none !important;
}

/* Hidden email form wrapper */
#ghe-email-result-form.ghe-hidden-initially,
#ghe-email-result-form[hidden] {
  display: none !important;
}

/* Calculator shell */
#ghe-cfm-calculator {
  background-color: #f5f5f5;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
  margin: 0 80px;
  border-radius: 30px 0 30px 0;
  padding: 40px 40px 0;
}

/* Labels */
#ghe-cfm-calculator label {
  font-size: 20px;
  font-weight: 600;
}

/* Inputs */
#ghe-cfm-calculator input,
#ghe-cfm-calculator select {
  border: 2px solid #e2e2e2;
  border-radius: 3px;
  padding: 5px;
  margin: 5px 0;
  max-width: 100%;
}

/* Field spacing */
#ghe-cfm-calculator .ghe-field {
  margin-bottom: 16px;
}

/* Greenhouse style row */
#ghe-cfm-calculator .ghe-style-picker {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  text-align: center;
  gap: 10px;
  padding-top: 8px;
  color: var(--dark-green);
}

/* Style buttons */
#ghe-cfm-calculator .ghe-style-option {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  color: inherit;
}

/* Figure / image */
#ghe-cfm-calculator .ghe-style-option figure {
  margin: 0;
  padding: 5px;
}

#ghe-cfm-calculator .ghe-style-option img {
  display: block;
  cursor: pointer;
  border: 2px solid transparent;
  margin: 0 auto;
  width: auto;
  max-width: 110px;
  height: auto;
}

/* Selected state */
#ghe-cfm-calculator .ghe-style-option.is-selected figure {
  border: 5px solid var(--dark-green);
  padding: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#ghe-cfm-calculator .ghe-style-option.is-selected img {
  opacity: 0.9;
}

/* Captions */
#ghe-cfm-calculator .ghe-style-option figcaption {
  text-align: center;
  margin-top: 0;
  padding-top: 0;
  color: inherit;
}

/* Tooltip trigger */
#ghe-cfm-calculator .ghe-info-icon {
  cursor: pointer;
  display: inline-block;
  color: blue;
  margin-left: 5px;
  font-size: 20px;
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1;
}

/* Tooltip wrapper */
#ghe-cfm-calculator .ghe-tooltip-wrap {
  position: relative;
  display: inline-block;
}

/* Tooltip content */
#ghe-cfm-calculator .ghe-tooltip {
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 10px;
  position: absolute;
  z-index: 10;
  width: 280px;
  max-width: 90vw;
  left: 0;
  top: calc(100% + 6px);
}

/* Calculate button */
#ghe-cfm-calculator .ghe-field:last-of-type {
  margin-bottom: 0;
}

#ghe-cfm-calculator #ghe_calc_button {
  width: calc(100% + 80px);
  margin-left: -40px;
  margin-right: -40px;
  text-align: center;
  border-radius: 0 0 30px 0;
  padding: 30px 0;
  border: none;
  cursor: pointer;
  background-color: #265c2c;
  color: white;
  font-size: 24px;
  font-weight: 900;
}

#ghe-cfm-calculator #ghe_calc_button:hover {
  background-color: #f2cb05;
  color: #265c2c;
}

/* Error message */
#ghe-cfm-calculator .ghe-message-error {
  display: block;
  color: red;
  font-weight: bold;
  font-size: 20px;
  padding: 30px;
  background-color: #ffe6e6;
  margin-top: 20px;
}

/* Main result block */
#ghe-cfm-calculator #ghe_result_volume {
  text-align: center;
  padding: 30px 20px 10px;
  margin-top: 20px;
}

#ghe-cfm-calculator .ghe-result-heading {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

#ghe-cfm-calculator .ghe-result-badge {
  display: inline-block;
  background-color: #f29f05;
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
  border-radius: 30px 0 30px 0;
  padding: 20px;
}

/* Supporting result text */
#ghe-cfm-calculator #ghe_result_cfm {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  padding: 10px 30px 20px;
}

#ghe-cfm-calculator .result-value {
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  border-radius: 0;
  padding: 0;
  display: inline;
}

#ghe-cfm-calculator #ghe_result_volume strong,
#ghe-cfm-calculator #ghe_result_cfm strong {
  font-weight: 700;
}

/* Follow-up section inside calculator, if still used */
#ghe-cfm-calculator .ghe-followup {
  padding: 30px 0 10px;
}

#ghe-cfm-calculator .ghe-followup h3 {
  color: #265c2c;
}

/* Email form section below calculator */
#ghe-email-result-form {
  margin: 28px 80px 0;
  padding: 0;
}

#ghe-email-result-form h2,
#ghe-email-result-form h3,
#ghe-email-result-form h4 {
  color: #265c2c;
  margin-bottom: 10px;
}

#ghe-email-result-form p {
  margin-bottom: 12px;
}

#ghe-email-result-form small {
  display: inline-block;
  margin-top: 6px;
}

/* Mobile */
@media (max-width: 767px) {
  #ghe-cfm-calculator {
    margin: 0 15px;
    padding: 24px 18px 0;
  }

  #ghe-cfm-calculator .ghe-style-picker {
    flex-wrap: wrap;
  }

  #ghe-cfm-calculator .ghe-style-option {
    width: calc(50% - 0.5rem);
  }

  #ghe-cfm-calculator .ghe-style-option img {
    max-width: 95px;
  }

  #ghe-cfm-calculator #ghe_calc_button {
    width: calc(100% + 36px);
    margin-left: -18px;
    margin-right: -18px;
  }

  #ghe-cfm-calculator .ghe-result-heading {
    font-size: 22px;
  }

  #ghe-cfm-calculator .ghe-result-badge {
    font-size: 24px;
    padding: 16px;
  }

  #ghe-cfm-calculator #ghe_result_cfm {
    font-size: 17px;
    padding: 10px 20px 20px;
  }

  #ghe-email-result-form {
    margin: 22px 15px 0;
  }
}