/* ======================================================
   RMWL BMI Calculator
   Compact vertical component for sidebar or page use.
   ====================================================== */

.rmwbmi-calculator {
  width: 240px;
  max-width: 240px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(105, 49, 137, 0.14);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
  color: #111111;
  font-family: "Open Sans", Arial, sans-serif;
}

.post-details .rmwbmi-calculator,
.text-content .rmwbmi-calculator {
  padding: 0;
}

.rmwbmi-calculator-sticky {
  position: fixed;
  right: 24px;
  top: auto !important;
  bottom: 24px !important;
  z-index: 999;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100vh - 48px) !important;
  overflow-y: auto;
}

body.rmwl-header-is-sticky .rmwbmi-calculator-sticky {
  top: auto !important;
  bottom: 36px !important;
  max-height: calc(100vh - 130px) !important;
}

.rmwbmi-calculator *,
.rmwbmi-calculator *::before,
.rmwbmi-calculator *::after {
  box-sizing: border-box;
}

.rmwbmi-inner {
  padding: 18px 13px 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.rmwbmi-calculator h2 {
  margin: 0 0 12px;
  color: #693189;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
}

.post-details .rmwbmi-calculator p,
.rmwbmi-calculator p {
  line-height: 1.3em !important;
  margin-bottom: 10px;
  font-size: .6em;
}

.rmwbmi-form {
  display: grid;
  gap: 11px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.rmwbmi-fieldset {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.rmwbmi-fieldset legend,
.rmwbmi-field label {
  display: block;
  margin: 0 0 5px;
  color: #693189;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
}

.rmwbmi-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.rmwbmi-segmented label {
  position: relative;
  cursor: pointer;
}

.rmwbmi-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rmwbmi-segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 8px;
  border: 1px solid rgba(105, 49, 137, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: #693189;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.rmwbmi-segmented input:checked + span {
  border-color: #693189;
  background: #693189;
  color: #ffffff;
}

.rmwbmi-field input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(105, 49, 137, 0.2);
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  font: inherit;
}

.rmwbmi-height-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.rmwbmi-button {
  min-height: 42px;
  padding: 10px 14px;
  border: 2px solid #f9d905;
  border-radius: 999px;
  background: #f9d905;
  color: #000000;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
}

.rmwbmi-button:hover,
.rmwbmi-button:focus {
  border-color: #693189;
  background: #693189;
  color: #ffffff;
}

.rmwbmi-result {
  padding: 13px;
  border-radius: 12px;
  border-left: 5px solid #f9d905;
  background: #fffdef;
}

.rmwbmi-result strong {
  display: block;
  margin-bottom: 4px;
  color: #693189;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.2;
}

.rmwbmi-result span {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
}

.rmwbmi-statement {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
}

.rmwbmi-cta {
  position: relative;
  padding: 26px 16px 22px;
  border-top: 6px solid #b09b6e;
  background: linear-gradient(145deg, #693189 0%, #52206d 100%);
  color: #ffffff;
  text-align: center;
}

.rmwbmi-cta-tab {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 64px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 6px 6px 0 0;
  background: #b09b6e;
}

.rmwbmi-cta h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.rmwbmi-cta-button {
  display: block;
  padding: 8px 12px;
  border: 2px solid #b09b6e;
  border-radius: 10px;
  background: #b09b6e;
  color: #ffffff !important;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.rmwbmi-cta-button:hover,
.rmwbmi-cta-button:focus {
  border-color: #f9d905;
  background: #f9d905;
  color: #000000 !important;
}

.rmwbmi-calculator input:focus,
.rmwbmi-calculator button:focus,
.rmwbmi-calculator a:focus,
.rmwbmi-segmented input:focus + span {
  outline: 3px solid #f9d905;
  outline-offset: 3px;
}

@media (max-width: 1300px) {
  .rmwbmi-calculator-sticky {
    display: none !important;
  }
}
