/* StroFIX tension rod – cut-to-length calculator, product-page styles (strofixrodcalc v0.2.0).
 * Self-contained: brand tokens from brand/README.md (official Pantone→HEX), scoped to .sfr-root so nothing
 * leaks into the theme. The last block hides the native Creative Elements buy widgets on THIS product page
 * only (body.strofix-rod-calc is added by rodcalc.js when it mounts). */

.sfr-root {
  --sfr-teal: #00453D; --sfr-teal-h: #0a5348; --sfr-sage: #91A19C; --sfr-light: #C7CCC4;
  --sfr-ink: #21211A; --sfr-tint: #edf2f0; --sfr-border: #e3e7e4; --sfr-warn: #A3441F; --sfr-mut: #5c5c56;
  font-family: "Work Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--sfr-ink); max-width: 560px; margin: 0 0 8px; text-align: left;
}
.sfr-root * { box-sizing: border-box; }
.sfr-root .sfr-f, .sfr-root label { text-align: left; }
.sfr-root .sfr-f { display: block; font-size: 12px; color: var(--sfr-mut); margin: 10px 0 3px; }
.sfr-sub { margin: 0 0 6px; }

/* our own -/+ and up/down controls (rodcalc.js attachStepper); native spinners off */
.sfr-root input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.sfr-root input[type=number]::-webkit-inner-spin-button,
.sfr-root input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sfr-step { display: flex; align-items: stretch; gap: 6px; }
.sfr-step > input { flex: 1 1 auto; min-width: 0; }
.sfr-stepbtn {
  flex: 0 0 auto; width: 38px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--sfr-ink, #21211A);
  border: 1px solid var(--sfr-border, #e3e7e4); border-radius: 2px;
  line-height: 0; transition: background .12s, border-color .12s;
}
.sfr-stepbtn svg { width: 14px; height: 14px; display: block; }
.sfr-stepbtn:hover { background: var(--sfr-tint, #edf2f0); border-color: var(--sfr-teal, #00453D); }
.sfr-stepbtn:active { background: var(--sfr-tint, #edf2f0); }
.sfr-step-pm { max-width: 190px; }
.sfr-step-pm > input { text-align: center; }
.sfr-step-ud { position: relative; max-width: 220px; }
.sfr-step-ud > input { padding-right: 30px; }
.sfr-stepcol { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 26px; display: flex; flex-direction: column; }
.sfr-stepbtn-sm { width: 26px; height: 50%; border: none; border-left: 1px solid var(--sfr-border, #e3e7e4); border-radius: 0; }
.sfr-stepbtn-sm svg { width: 11px; height: 11px; }
.sfr-stepbtn-sm:first-child { border-bottom: 1px solid var(--sfr-border, #e3e7e4); }

.sfr-root select, .sfr-root input[type=number], .sfr-root input[type=text] {
  font: inherit; font-size: 13.5px; padding: 6px 8px; border: 1px solid var(--sfr-border);
  border-radius: 6px; width: 100%; background: #fff; color: var(--sfr-ink); height: auto;
}
.sfr-root input.bad { border-color: var(--sfr-warn) !important; }
.sfr-err { color: var(--sfr-warn); font-size: 12.5px; margin-top: 8px; font-weight: 500; }
.sfr-hint { font-size: 12px; color: var(--sfr-mut); margin-top: 8px; line-height: 1.45; }
.sfr-muted { color: var(--sfr-mut); font-weight: 400; }
.sfr-chk { display: flex; gap: 7px; align-items: center; font-size: 13.5px; margin-top: 12px; }
.sfr-chk input { width: auto; }
.sfr-info {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
  border-radius: 50%; background: var(--sfr-sage); color: #fff; font-size: 10px; font-weight: 600;
  margin-left: 5px; cursor: help; position: relative; vertical-align: -2px;
}
.sfr-info::after {
  content: attr(data-tip); position: absolute; left: 50%; transform: translateX(-50%); bottom: 22px;
  z-index: 20; background: var(--sfr-ink); color: #fff; font-weight: 400; font-size: 12px; line-height: 1.5;
  padding: 8px 11px; border-radius: 6px; width: 260px; text-align: left; opacity: 0; pointer-events: none; transition: opacity .12s;
}
.sfr-info:hover::after, .sfr-info:focus::after { opacity: 1; }

/* the standard-length picker */
.sfr-std { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 4px; }
.sfr-root .sfr-pick {
  font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 6px; background: #fff; color: var(--sfr-ink, #21211A);
  border: 1px solid var(--sfr-border, #e3e7e4); border-radius: 8px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.sfr-root .sfr-pick:hover { border-color: var(--sfr-teal, #00453D); background: var(--sfr-tint, #edf2f0); }
.sfr-root .sfr-pick.sfr-on { border-color: var(--sfr-teal, #00453D); background: var(--sfr-tint, #edf2f0); box-shadow: inset 0 0 0 1px var(--sfr-teal, #00453D); }
.sfr-pick-mm { font-size: 14px; font-weight: 600; }
.sfr-pick-price { font-size: 12px; color: var(--sfr-mut, #5c5c56); }
.sfr-root #sfr_customWrap { margin-top: 4px; }

/* the finish picker: swatch + name */
.sfr-fin { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin-top: 4px; }
.sfr-root .sfr-finpick {
  font: inherit; font-size: 12.5px; display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; background: #fff; color: var(--sfr-ink, #21211A); text-align: left;
  border: 1px solid var(--sfr-border, #e3e7e4); border-radius: 8px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.sfr-root .sfr-finpick:hover { border-color: var(--sfr-teal, #00453D); background: var(--sfr-tint, #edf2f0); }
.sfr-root .sfr-finpick.sfr-on { border-color: var(--sfr-teal, #00453D); background: var(--sfr-tint, #edf2f0); box-shadow: inset 0 0 0 1px var(--sfr-teal, #00453D); }
.sfr-swatch { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); }
.sfr-finname { flex: 1 1 auto; line-height: 1.25; }

/* price table */
.sfr-price-card, .sfr-spec-card { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sfr-border); }
.sfr-bd { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 10px; }
.sfr-bd td, .sfr-bd th { padding: 3.5px 0; }
.sfr-bd .sfr-hd th { color: var(--sfr-mut); font-size: 11.5px; border-bottom: 1px solid var(--sfr-border); font-weight: 400; text-align: left; }
.sfr-bd .sfr-hd th + th { padding-left: 14px; text-align: right; white-space: nowrap; }
.sfr-bd td { border-bottom: 1px dashed #e4e4df; }
.sfr-bd td:nth-child(2), .sfr-bd td:nth-child(3), .sfr-bd td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sfr-bd td + td { padding-left: 14px; }
.sfr-bd .sfr-nb { border-bottom: none; }
.sfr-bd .sfr-r { text-align: right; }
.sfr-bd tr.sfr-tot td { border-bottom: none; font-weight: 600; padding-top: 7px; }
.sfr-sku { font-size: 11px; color: var(--sfr-mut); letter-spacing: .2px; }
.sfr-qtyrow { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; }
.sfr-qtyrow .sfr-f { margin: 0; white-space: nowrap; }
.sfr-root #sfr_qty { width: auto; }
.sfr-root .sfr-cart {
  font: inherit; font-size: 14.5px; font-weight: 600; width: 100%; margin-top: 6px; padding: 11px;
  background: var(--sfr-teal); color: #fff; border: none; border-radius: 8px; cursor: pointer;
}
.sfr-root .sfr-cart:disabled { background: var(--sfr-sage); cursor: default; }
.sfr-root .sfr-cart:hover:not(:disabled) { background: var(--sfr-teal-h); }

/* left column: the drawing + the spec */
.sfr-left { max-width: 560px; margin: 0 auto; width: 100%; }
.sfr-root svg text { font-family: "Work Sans", Arial, sans-serif; }
.sfr-left .sfr-spec-card { margin-top: 8px; }
.sfr-speclab { font-size: 11px; color: var(--sfr-mut); letter-spacing: .4px; margin-bottom: 10px; }
.sfr-spec { display: grid; grid-template-columns: max-content 1fr; gap: 5px 24px; font-size: 13px; line-height: 1.5; }
.sfr-spec .sfr-sl { color: var(--sfr-mut); }
.sfr-spec .sfr-sv { font-weight: 500; }
body.strofix-rod-calc .elementor-widget-product-images,
body.strofix-rod-calc .elementor-widget-product-images > .elementor-widget-container {
  height: 100%; display: flex; flex-direction: column; justify-content: flex-start;
}
/* keep the native gallery hidden even if CE / Swiper re-renders it: hide every child of the image host
   except our drawing column (CSS survives a re-render, unlike a one-time inline display:none) */
body.strofix-rod-calc .elementor-widget-product-images > .elementor-widget-container > *:not(#sfr-left) { display: none !important; }

/* hide the native CE buy widgets on this product page only */
body.strofix-rod-calc .elementor-widget-product-price,
body.strofix-rod-calc .elementor-widget-product-variants,
body.strofix-rod-calc .elementor-widget-product-quantity,
body.strofix-rod-calc .elementor-widget-product-stock,
body.strofix-rod-calc .elementor-widget-product-add-to-cart,
body.strofix-rod-calc .elementor-widget-product-customization { display: none !important; }
