.fshe-estimate-widget * { box-sizing: border-box; }
.fshe-estimate-widget {
  --fshe-accent: #c9a466;
  --fshe-accent-dark: #a8823f;
  --fshe-error: #b3261e;
  --fshe-ink: #1c1c1e;
  --fshe-gray: #5a5d63;
  --fshe-border: #dcdcdc;
  --fshe-bg-soft: #f7f5f4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 640px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--fshe-border);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  overflow: hidden;
  color: var(--fshe-ink);
  line-height: 1.4;
}
.fshe-estimate-widget .fshe-header {
  background: var(--fshe-ink);
  color: #fff;
  padding: 22px 24px;
  text-align: center;
}
.fshe-estimate-widget .fshe-header h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: 0.3px; }
.fshe-estimate-widget .fshe-header p { margin: 0; font-size: 14px; color: #d8d8d8; }
.fshe-estimate-widget .fshe-body { padding: 24px; }
.fshe-estimate-widget .fshe-step-label { color: var(--fshe-accent); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 6px; }
.fshe-estimate-widget .fshe-step-title { font-size: 17px; font-weight: 700; margin: 0 0 14px; color: var(--fshe-ink); }
.fshe-estimate-widget .fshe-room-row { display: grid; grid-template-columns: 1fr 90px 90px 90px 32px; gap: 8px; align-items: center; margin-bottom: 10px; }
.fshe-estimate-widget .fshe-room-row input {
  width: 100%; padding: 9px 10px; border: 1px solid var(--fshe-border);
  border-radius: 6px; font-size: 14px; color: var(--fshe-ink); background: #fff;
}
.fshe-estimate-widget .fshe-room-row input:focus,
.fshe-estimate-widget input:focus,
.fshe-estimate-widget select:focus,
.fshe-estimate-widget textarea:focus {
  outline: none; border-color: var(--fshe-accent); box-shadow: 0 0 0 3px rgba(201,164,102,0.18);
}
.fshe-estimate-widget .fshe-room-sqft { font-size: 13px; color: var(--fshe-gray); text-align: right; white-space: nowrap; }
.fshe-estimate-widget .fshe-remove-room { background: none; border: none; color: #b7b7b7; font-size: 18px; line-height: 1; cursor: pointer; padding: 6px; }
.fshe-estimate-widget .fshe-remove-room:hover { color: var(--fshe-accent); }
.fshe-estimate-widget .fshe-col-headers {
  display: grid; grid-template-columns: 1fr 90px 90px 90px 32px; gap: 8px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--fshe-gray); margin-bottom: 8px;
}
.fshe-estimate-widget .fshe-add-room {
  background: none; border: 1.5px dashed var(--fshe-accent); color: var(--fshe-accent);
  font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 6px; cursor: pointer; margin-top: 4px;
}
.fshe-estimate-widget .fshe-add-room:hover { background: rgba(165,52,43,0.06); }
.fshe-estimate-widget .fshe-divider { height: 1px; background: var(--fshe-border); margin: 22px 0; }
.fshe-estimate-widget label.fshe-field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--fshe-ink); }
.fshe-estimate-widget select,
.fshe-estimate-widget textarea,
.fshe-estimate-widget input[type="text"],
.fshe-estimate-widget input[type="email"],
.fshe-estimate-widget input[type="tel"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--fshe-border);
  border-radius: 6px; font-size: 14px; color: var(--fshe-ink); background: #fff; font-family: inherit;
}
.fshe-estimate-widget .fshe-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fshe-estimate-widget .fshe-addons-list { display: flex; flex-direction: column; gap: 8px; }
.fshe-estimate-widget .fshe-addon-option {
  display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; font-weight: 400;
  padding: 9px 12px; border: 1px solid var(--fshe-border); border-radius: 6px; cursor: pointer;
}
.fshe-estimate-widget .fshe-addon-option:hover { border-color: var(--fshe-accent); }
.fshe-estimate-widget .fshe-addon-option input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 2px 0 0; }
.fshe-estimate-widget .fshe-addon-label { flex: 1; color: var(--fshe-ink); }
.fshe-estimate-widget .fshe-addon-rate { color: var(--fshe-gray); font-size: 12px; white-space: nowrap; }
.fshe-estimate-widget .fshe-field { margin-bottom: 14px; }
.fshe-estimate-widget .fshe-calc-btn {
  width: 100%; background: var(--fshe-accent); color: #fff; border: none; padding: 13px 16px;
  font-size: 15px; font-weight: 700; border-radius: 6px; cursor: pointer; margin-top: 6px; transition: background 0.15s ease;
}
.fshe-estimate-widget .fshe-calc-btn:hover { background: var(--fshe-accent-dark); }
.fshe-estimate-widget .fshe-calc-btn:disabled { opacity: 0.6; cursor: default; }
.fshe-estimate-widget .fshe-results { display: none; background: var(--fshe-bg-soft); border: 1px solid var(--fshe-border); border-radius: 8px; padding: 18px 20px; margin-top: 18px; }
.fshe-estimate-widget .fshe-results.fshe-visible { display: block; }
.fshe-estimate-widget .fshe-results-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.fshe-estimate-widget .fshe-results-row + .fshe-results-row { border-top: 1px dashed #d7d3d1; }
.fshe-estimate-widget .fshe-results-label { font-size: 13px; color: var(--fshe-gray); }
.fshe-estimate-widget .fshe-results-value { font-size: 15px; font-weight: 700; color: var(--fshe-ink); }
.fshe-estimate-widget .fshe-results-value.fshe-big { font-size: 22px; color: var(--fshe-accent); }
.fshe-estimate-widget .fshe-disclaimer { font-size: 11.5px; color: var(--fshe-gray); margin-top: 12px; line-height: 1.5; }
.fshe-estimate-widget .fshe-quote-required { font-weight: 600; color: var(--fshe-ink); }
.fshe-estimate-widget .fshe-lead-section { display: none; margin-top: 20px; }
.fshe-estimate-widget .fshe-lead-section.fshe-visible { display: block; }
.fshe-estimate-widget .fshe-success { display: none; text-align: center; padding: 30px 20px; }
.fshe-estimate-widget .fshe-success.fshe-visible { display: block; }
.fshe-estimate-widget .fshe-success .fshe-check {
  width: 52px; height: 52px; border-radius: 50%; background: var(--fshe-accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 14px;
}
.fshe-estimate-widget .fshe-success h3 { margin: 0 0 8px; font-size: 18px; }
.fshe-estimate-widget .fshe-success p { margin: 0; color: var(--fshe-gray); font-size: 14px; }
.fshe-estimate-widget .fshe-footer-contact { text-align: center; padding: 14px 24px 22px; font-size: 13px; color: var(--fshe-gray); }
.fshe-estimate-widget .fshe-footer-contact a { color: var(--fshe-accent); font-weight: 600; text-decoration: none; }
.fshe-estimate-widget .fshe-error { color: var(--fshe-error); font-size: 12.5px; margin-top: -8px; margin-bottom: 12px; display: none; }
.fshe-estimate-widget .fshe-error.fshe-visible { display: block; }

@media (max-width: 480px) {
  .fshe-estimate-widget .fshe-body { padding: 18px; }
  .fshe-estimate-widget .fshe-room-row,
  .fshe-estimate-widget .fshe-col-headers {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "name name" "len wid" "sqft remove";
  }
  .fshe-estimate-widget .fshe-col-headers { display: none; }
  .fshe-estimate-widget .fshe-room-row { padding-bottom: 10px; border-bottom: 1px solid #eee; }
  .fshe-estimate-widget .fshe-room-row [data-fshe-room-name] { grid-area: name; }
  .fshe-estimate-widget .fshe-room-row [data-fshe-room-len] { grid-area: len; }
  .fshe-estimate-widget .fshe-room-row [data-fshe-room-wid] { grid-area: wid; }
  .fshe-estimate-widget .fshe-room-sqft { grid-area: sqft; text-align: left; padding-top: 4px; }
  .fshe-estimate-widget .fshe-remove-room { grid-area: remove; justify-self: end; }
  .fshe-estimate-widget .fshe-grid-2 { grid-template-columns: 1fr; }
}

/* ---- Floating button + modal ---- */
.fshe-fab {
  position: fixed;
  bottom: 24px;
  z-index: 99998;
  background: var(--fshe-fab-color, #c9a466);
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fshe-fab.fshe-fab-right { right: 24px; }
.fshe-fab.fshe-fab-left { left: 24px; }
.fshe-fab:hover { filter: brightness(0.92); }

.fshe-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(20,20,22,0.6);
  z-index: 99999;
  padding: 24px 16px;
  overflow-y: auto;
}
.fshe-modal-overlay.fshe-visible { display: flex; align-items: flex-start; justify-content: center; }
.fshe-modal-shell { position: relative; width: 100%; max-width: 680px; margin: auto; }
.fshe-modal-close {
  position: absolute; top: -14px; right: -14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 1px solid var(--fshe-border, #dcdcdc);
  font-size: 18px; line-height: 1; cursor: pointer; z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ---- Theme compatibility fixes (v1.1.2) ----
 * Keep the modal heading, close control, and plugin button hover states
 * from being overridden by Elementor/theme global button and heading CSS.
 */
.fshe-estimate-widget .fshe-header h2 {
  color: #ffffff !important;
  background: transparent !important;
  line-height: 1.25 !important;
  text-shadow: none !important;
}
.fshe-estimate-widget .fshe-header p {
  color: #d8d8d8 !important;
}

.fshe-modal-shell {
  position: relative !important;
  overflow: visible;
}
.fshe-modal-shell > .fshe-modal-close,
button.fshe-modal-close {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: absolute !important;
  top: 6px !important;
  right: 25px !important;
  left: auto !important;
  bottom: auto !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--fshe-accent, #c9a466) !important;
  color: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 24px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22) !important;
  cursor: pointer !important;
  z-index: 20 !important;
  transform: none !important;
  transition: background-color .18s ease, box-shadow .18s ease !important;
}
.fshe-modal-shell > .fshe-modal-close:hover,
.fshe-modal-shell > .fshe-modal-close:focus,
button.fshe-modal-close:hover,
button.fshe-modal-close:focus {
  background: var(--fshe-accent-dark, #a8823f) !important;
  color: #ffffff !important;
  border: 0 !important;
  transform: none !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.28) !important;
  outline: none !important;
}

.fshe-estimate-widget button.fshe-add-room {
  background: #ffffff !important;
  color: var(--fshe-accent) !important;
  border: 1.5px dashed var(--fshe-accent) !important;
  text-decoration: none !important;
  transform: none !important;
}
.fshe-estimate-widget button.fshe-add-room:hover,
.fshe-estimate-widget button.fshe-add-room:focus {
  background: rgba(201,164,102,0.12) !important;
  color: var(--fshe-accent-dark) !important;
  border-color: var(--fshe-accent-dark) !important;
  transform: none !important;
}

.fshe-estimate-widget button.fshe-calc-btn,
.fshe-estimate-widget button.fshe-calc-btn:visited {
  background: var(--fshe-accent) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
.fshe-estimate-widget button.fshe-calc-btn:hover,
.fshe-estimate-widget button.fshe-calc-btn:focus {
  background: var(--fshe-accent-dark) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

button.fshe-fab,
button.fshe-fab:visited {
  background: var(--fshe-fab-color, #c9a466) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transition: filter .18s ease, transform .18s ease, box-shadow .18s ease !important;
}
button.fshe-fab:hover,
button.fshe-fab:focus {
  background: var(--fshe-fab-color, #c9a466) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  filter: brightness(0.90) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.26) !important;
}

@media (max-width: 480px) {
  .fshe-estimate-widget .fshe-header {
    padding: 20px 58px 20px 18px;
  }
  .fshe-estimate-widget .fshe-header h2 {
    font-size: 20px !important;
  }
  .fshe-modal-shell > .fshe-modal-close,
  button.fshe-modal-close {
    top: 10px !important;
    right: 10px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
  }
}
