/* Enoch WPC UPVC Calculator v1.0.0
 * UI isolation for WordPress/Elementor + responsive calculator layout.
 */
.enoch-wpc-upvc-calculator{
  --ewc-navy:#123873;
  --ewc-navy-dark:#0b2d5a;
  --ewc-blue-soft:#eef4ff;
  --ewc-gold:#d2b126;
  --ewc-gold-soft:#fff8dc;
  --ewc-text:#102f59;
  --ewc-body:#344054;
  --ewc-muted:#667085;
  --ewc-border:#d8dee9;
  --ewc-panel:#f7f9fc;
  --ewc-danger:#b42318;
  --ewc-success:#217a3c;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  font-family:"Noto Sans Thai","Prompt","Leelawadee UI",Tahoma,Arial,sans-serif!important;
  font-size:16px!important;
  font-weight:400!important;
  line-height:1.5!important;
  color:var(--ewc-text)!important;
  text-align:left!important;
  letter-spacing:normal!important;
  word-spacing:normal!important;
  text-transform:none!important;
  -webkit-text-size-adjust:100%;
}
.enoch-wpc-upvc-calculator *,
.enoch-wpc-upvc-calculator *::before,
.enoch-wpc-upvc-calculator *::after{box-sizing:border-box}
.enoch-wpc-upvc-calculator [hidden]{display:none!important}

/* Guard against Elementor/theme wrappers that set font-size:0 or alter controls. */
.enoch-wpc-upvc-calculator button,
.enoch-wpc-upvc-calculator input,
.enoch-wpc-upvc-calculator select,
.enoch-wpc-upvc-calculator option,
.enoch-wpc-upvc-calculator label,
.enoch-wpc-upvc-calculator small,
.enoch-wpc-upvc-calculator span,
.enoch-wpc-upvc-calculator a{
  font-family:inherit!important;
  letter-spacing:normal!important;
  text-transform:none!important;
}
.enoch-wpc-upvc-calculator button,
.enoch-wpc-upvc-calculator input,
.enoch-wpc-upvc-calculator select{
  font-size:16px!important;
  line-height:1.35!important;
}

.ewc-shell{
  width:100%;
  max-width:1120px;
  margin:0 auto;
  background:#fff;
  border:1px solid var(--ewc-border);
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 16px 44px rgba(10,38,74,.08);
}
.ewc-hero{
  position:relative;
  padding:34px 36px 30px;
  background:linear-gradient(135deg,#ffffff 0%,#f6f9ff 72%,#eef4ff 100%);
  border-bottom:1px solid #e7ebf2;
}
.ewc-hero::after{
  content:"";
  position:absolute;
  right:-42px;
  top:-62px;
  width:190px;
  height:190px;
  border-radius:50%;
  background:rgba(210,177,38,.08);
  pointer-events:none;
}
.ewc-eyebrow{
  position:relative;
  z-index:1;
  margin:0 0 8px;
  color:#9a7a0f!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.4!important;
  letter-spacing:1.7px!important;
}
.ewc-hero h2{
  position:relative;
  z-index:1;
  margin:0 0 9px!important;
  color:var(--ewc-navy-dark)!important;
  font-size:clamp(28px,4vw,40px)!important;
  font-weight:800!important;
  line-height:1.2!important;
  letter-spacing:-.3px!important;
}
.ewc-hero p{
  position:relative;
  z-index:1;
  max-width:850px;
  margin:0!important;
  color:#56657a!important;
  font-size:15px!important;
  line-height:1.65!important;
}

.ewc-section{padding:30px 36px;border-bottom:1px solid #edf0f5;background:#fff}
.ewc-step-head{display:flex;gap:14px;align-items:flex-start;margin:0 0 20px}
.ewc-step{
  display:grid!important;
  place-items:center;
  flex:0 0 40px;
  width:40px;
  min-width:40px;
  height:40px;
  margin:0!important;
  border-radius:50%;
  background:var(--ewc-navy)!important;
  color:#fff!important;
  font-size:18px!important;
  font-weight:800!important;
  line-height:1!important;
}
.ewc-step-head h3{
  margin:0!important;
  color:var(--ewc-navy-dark)!important;
  font-size:23px!important;
  font-weight:800!important;
  line-height:1.25!important;
}
.ewc-step-head p{
  margin:3px 0 0!important;
  color:var(--ewc-muted)!important;
  font-size:13px!important;
  line-height:1.5!important;
}

.ewc-label,
.ewc-field label{
  display:block!important;
  margin:0 0 7px!important;
  color:#344054!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1.45!important;
}
.ewc-select,
.ewc-input,
.ewc-custom-waste input{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:52px!important;
  min-height:52px!important;
  margin:0!important;
  padding:0 14px!important;
  border:1px solid #cdd5df!important;
  border-radius:10px!important;
  background-color:#fff!important;
  box-shadow:none!important;
  color:#172b4d!important;
  font-size:16px!important;
  font-weight:500!important;
  line-height:1.35!important;
  opacity:1!important;
  outline:none!important;
  transition:border-color .18s,box-shadow .18s,background-color .18s;
}
.ewc-select{
  padding-right:42px!important;
  cursor:pointer;
}
.ewc-select option{font-size:16px!important;color:#172b4d!important;background:#fff!important}
.ewc-input::placeholder,
.ewc-custom-waste input::placeholder{color:#98a2b3!important;opacity:1!important;font-size:15px!important}
.ewc-select:focus,
.ewc-input:focus,
.ewc-custom-waste input:focus{
  border-color:var(--ewc-navy)!important;
  box-shadow:0 0 0 3px rgba(18,56,115,.11)!important;
}

.ewc-product-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:14px 0 0;
}
.ewc-info-card,
.ewc-result-card{
  min-width:0;
  border:1px solid #dce2eb;
  border-radius:13px;
  background:var(--ewc-panel);
  padding:16px 18px;
}
.ewc-info-card span,
.ewc-result-card span{
  display:block!important;
  color:#697586!important;
  font-size:13px!important;
  font-weight:500!important;
  line-height:1.4!important;
}
.ewc-info-card strong,
.ewc-result-card strong{
  display:block!important;
  margin:4px 0 2px!important;
  color:var(--ewc-navy-dark)!important;
  font-size:26px!important;
  font-weight:800!important;
  line-height:1.15!important;
}
.ewc-info-card small,
.ewc-result-card small{
  display:block!important;
  color:#667085!important;
  font-size:12px!important;
  font-weight:500!important;
  line-height:1.45!important;
}

.ewc-areas{display:grid;gap:12px}
.ewc-area-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(160px,.72fr) 46px;
  gap:12px;
  align-items:end;
  padding:15px;
  border:1px solid #dce2eb;
  border-radius:13px;
  background:#fff;
  box-shadow:0 2px 8px rgba(16,47,89,.025);
}
.ewc-field{min-width:0}
.ewc-area-output{
  display:flex!important;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:52px;
  padding:0 12px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#eef3fb!important;
  color:var(--ewc-navy-dark)!important;
  font-size:16px!important;
  font-weight:800!important;
  line-height:1.3!important;
  text-align:center!important;
  white-space:nowrap;
}
.ewc-remove{
  display:inline-grid!important;
  place-items:center;
  width:46px!important;
  min-width:46px!important;
  height:52px!important;
  min-height:52px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #fee2e2!important;
  border-radius:10px!important;
  background:#fff7f7!important;
  box-shadow:none!important;
  color:#c94a54!important;
  font-size:25px!important;
  font-weight:500!important;
  line-height:1!important;
  cursor:pointer;
}
.ewc-remove:hover{background:#ffeded!important;border-color:#fecaca!important}
.ewc-remove:disabled{opacity:.4!important;cursor:not-allowed}

.ewc-btn{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto;
  min-width:0;
  min-height:48px!important;
  margin:0!important;
  padding:11px 18px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  box-shadow:none!important;
  font-size:15px!important;
  font-weight:800!important;
  line-height:1.35!important;
  text-align:center!important;
  text-decoration:none!important;
  white-space:normal!important;
  cursor:pointer;
  opacity:1!important;
  visibility:visible!important;
  transition:transform .16s,background-color .16s,border-color .16s,box-shadow .16s;
}
.ewc-btn:hover{transform:translateY(-1px);text-decoration:none!important}
.ewc-btn:focus-visible{outline:3px solid rgba(18,56,115,.18)!important;outline-offset:2px}
.ewc-btn-primary{background:var(--ewc-navy)!important;color:#fff!important;border-color:var(--ewc-navy)!important}
.ewc-btn-primary:hover{background:var(--ewc-navy-dark)!important;border-color:var(--ewc-navy-dark)!important}
.ewc-btn-gold{background:var(--ewc-gold)!important;color:#17233b!important;border-color:var(--ewc-gold)!important}
.ewc-btn-gold:hover{background:#c3a01c!important;border-color:#c3a01c!important}
.ewc-btn-outline{background:#fff!important;color:var(--ewc-navy)!important;border-color:var(--ewc-navy)!important}
.ewc-btn-outline:hover{background:#f5f8fd!important}
.ewc-add-area{margin-top:12px!important;padding-left:16px!important;padding-right:16px!important}

.ewc-waste-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.ewc-waste-option{
  position:relative;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px;
  width:100%;
  min-width:0;
  min-height:50px;
  margin:0!important;
  padding:9px 12px!important;
  border:1px solid #cfd6e2;
  border-radius:10px;
  background:#fff;
  color:#344054!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.2!important;
  cursor:pointer;
  transition:border-color .18s,background-color .18s,box-shadow .18s;
}
.ewc-waste-option input[type="radio"]{
  appearance:auto!important;
  -webkit-appearance:radio!important;
  display:inline-block!important;
  flex:0 0 auto!important;
  width:17px!important;
  height:17px!important;
  min-height:17px!important;
  margin:0!important;
  padding:0!important;
  opacity:1!important;
  visibility:visible!important;
  accent-color:var(--ewc-navy);
}
.ewc-waste-option span{
  display:inline!important;
  width:auto!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  color:#344054!important;
  font-size:16px!important;
  font-weight:800!important;
  line-height:1.2!important;
  opacity:1!important;
  visibility:visible!important;
}
.ewc-waste-option:has(input:checked){
  border-color:var(--ewc-navy);
  background:#f0f5fd;
  box-shadow:0 0 0 1px var(--ewc-navy) inset;
}
.ewc-custom-waste{display:block!important;margin:0!important;min-width:0}
.ewc-custom-waste input{height:50px!important;min-height:50px!important;font-size:15px!important;text-align:center}

.ewc-calc-wrap{padding:26px 36px 28px;background:#fff}
.ewc-calculate{width:100%!important;min-height:60px!important;font-size:18px!important;border-radius:11px!important;box-shadow:0 8px 20px rgba(18,56,115,.12)!important}
.ewc-error{min-height:1px;margin:10px 0 0;color:var(--ewc-danger)!important;font-size:14px!important;font-weight:700!important;line-height:1.5!important}

.ewc-result{
  margin:0 36px 30px;
  padding:24px;
  border:2px solid #173e76;
  border-radius:16px;
  background:#fff;
  box-shadow:0 12px 30px rgba(18,56,115,.08);
}
.ewc-result-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 0 16px;border-bottom:1px solid #dfe4ec}
.ewc-result-label{color:#a88510!important;font-size:12px!important;font-weight:800!important;line-height:1.4!important;letter-spacing:.8px!important;text-transform:uppercase!important}
.ewc-result-head h3{margin:2px 0 0!important;color:var(--ewc-navy-dark)!important;font-size:26px!important;font-weight:800!important;line-height:1.25!important}
.ewc-status{display:inline-flex!important;align-items:center;white-space:nowrap;padding:7px 11px;border-radius:999px;background:#eef8ef!important;color:var(--ewc-success)!important;font-size:12px!important;font-weight:800!important;line-height:1.2!important}
.ewc-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.ewc-result-card-accent{background:var(--ewc-gold-soft)!important;border-color:#e3ca64!important}
.ewc-price-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 19px;border-radius:12px;background:linear-gradient(135deg,var(--ewc-navy),var(--ewc-navy-dark));color:#fff!important}
.ewc-price-bar div strong{display:block!important;color:#fff!important;font-size:17px!important;font-weight:800!important;line-height:1.3!important}
.ewc-price-bar div span{display:block!important;margin-top:2px;color:#dbe6f6!important;font-size:12px!important;font-weight:500!important;line-height:1.4!important}
.ewc-price-bar>strong{display:block!important;color:#fff!important;font-size:30px!important;font-weight:800!important;line-height:1.15!important;white-space:nowrap}

.ewc-detail-box{overflow:hidden;margin-top:18px;border:1px solid #cfd6e2;border-radius:11px;background:#fff}
.ewc-detail-title{padding:12px 16px;background:var(--ewc-navy-dark)!important;color:#fff!important;font-size:15px!important;font-weight:800!important;line-height:1.4!important}
.ewc-detail-box dl{margin:0!important;padding:0!important}
.ewc-detail-box dl div{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0!important;padding:11px 16px;border-top:1px solid #e8ebf0}
.ewc-detail-box dl div:first-child{border-top:0}
.ewc-detail-box dt{margin:0!important;color:#475467!important;font-size:14px!important;font-weight:500!important;line-height:1.45!important}
.ewc-detail-box dd{margin:0!important;color:var(--ewc-navy-dark)!important;font-size:14px!important;font-weight:800!important;line-height:1.45!important;text-align:right!important}

.ewc-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}
.ewc-actions .ewc-btn{width:100%!important}
.ewc-quote-box{margin-top:18px;padding:21px;border:1px solid #ead786;border-radius:12px;background:#fff9df;text-align:center!important}
.ewc-quote-box h4{margin:0 0 4px!important;color:var(--ewc-navy-dark)!important;font-size:20px!important;font-weight:800!important;line-height:1.3!important}
.ewc-quote-box p{margin:0 0 13px!important;color:#59677b!important;font-size:14px!important;line-height:1.55!important}
.ewc-quote{min-width:260px}
.ewc-note{margin:0 36px 30px;padding:13px 16px;border-left:4px solid #ccb126;background:#fff9dc;color:#4e5563!important;font-size:13px!important;font-weight:400!important;line-height:1.65!important}
.ewc-note strong{color:#344054!important;font-size:13px!important;font-weight:800!important}

@media (max-width:900px){
  .ewc-hero,.ewc-section,.ewc-calc-wrap{padding-left:22px;padding-right:22px}
  .ewc-result{margin-left:22px;margin-right:22px;padding:19px}
  .ewc-note{margin-left:22px;margin-right:22px}
  .ewc-area-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .ewc-area-output{grid-column:1 / 2}
  .ewc-remove{grid-column:2 / 3;justify-self:end}
  .ewc-waste-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ewc-custom-waste{grid-column:1 / -1}
}

@media (max-width:640px){
  .ewc-shell{border-radius:14px}
  .ewc-hero{padding-top:26px;padding-bottom:24px}
  .ewc-hero h2{font-size:28px!important}
  .ewc-hero p{font-size:14px!important}
  .ewc-section{padding-top:24px;padding-bottom:24px}
  .ewc-step{flex-basis:36px;width:36px;min-width:36px;height:36px;font-size:16px!important}
  .ewc-step-head{gap:11px;margin-bottom:17px}
  .ewc-step-head h3{font-size:20px!important}
  .ewc-product-cards{grid-template-columns:1fr}
  .ewc-info-card{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;column-gap:12px;align-items:center}
  .ewc-info-card span{grid-column:1;grid-row:1 / span 2;align-self:center}
  .ewc-info-card strong{grid-column:2;grid-row:1;margin:0!important;text-align:right!important;font-size:23px!important}
  .ewc-info-card small{grid-column:2;grid-row:2;text-align:right!important}
  .ewc-area-row{grid-template-columns:1fr;gap:10px;padding:13px}
  .ewc-area-output,.ewc-remove{grid-column:auto}
  .ewc-area-output{justify-content:flex-start;padding-left:14px;text-align:left!important}
  .ewc-remove{justify-self:stretch;width:100%!important;height:42px!important;min-height:42px!important}
  .ewc-add-area{width:100%!important}
  .ewc-waste-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ewc-result-grid{grid-template-columns:1fr 1fr}
  .ewc-price-bar{align-items:flex-start;flex-direction:column;gap:8px}
  .ewc-price-bar>strong{font-size:26px!important}
  .ewc-actions{grid-template-columns:1fr}
  .ewc-result-head{align-items:flex-start}
  .ewc-result-head h3{font-size:22px!important}
  .ewc-detail-box dl div{gap:12px}
  .ewc-quote{width:100%!important;min-width:0}
}

@media (max-width:420px){
  .ewc-hero,.ewc-section,.ewc-calc-wrap{padding-left:16px;padding-right:16px}
  .ewc-result{margin-left:16px;margin-right:16px;padding:15px}
  .ewc-note{margin-left:16px;margin-right:16px}
  .ewc-hero h2{font-size:25px!important}
  .ewc-product-cards,.ewc-result-grid{grid-template-columns:1fr}
  .ewc-info-card{display:block}
  .ewc-info-card span,.ewc-info-card strong,.ewc-info-card small{text-align:left!important}
  .ewc-waste-grid{grid-template-columns:1fr 1fr}
  .ewc-detail-box dl div{display:block}
  .ewc-detail-box dd{margin-top:3px!important;text-align:left!important}
  .ewc-status{padding:6px 9px}
}

@media print{
  body *{visibility:hidden!important}
  .enoch-wpc-upvc-calculator,.enoch-wpc-upvc-calculator *{visibility:visible!important}
  .enoch-wpc-upvc-calculator{position:absolute!important;left:0;top:0;width:100%!important}
  .ewc-shell{box-shadow:none!important;border:0!important}
  .ewc-section,.ewc-calc-wrap,.ewc-actions,.ewc-quote-box,.ewc-note,.ewc-hero p,.ewc-eyebrow{display:none!important}
  .ewc-result{display:block!important;margin:0!important;border:1px solid #333!important;box-shadow:none!important}
  .ewc-result-grid{grid-template-columns:repeat(3,1fr)!important}
  .ewc-price-bar{background:#fff!important;color:#000!important;border:1px solid #333!important}
  .ewc-price-bar *{color:#000!important}
  .ewc-detail-title{background:#fff!important;color:#000!important;border-bottom:1px solid #333!important}
}

/* WPC/UPVC product-specific refinements */
.ewc-size-value{
  font-size:16px!important;
  line-height:1.35!important;
  word-break:break-word;
}
@media (max-width:900px) and (min-width:641px){
  .ewc-product-cards{grid-template-columns:repeat(2,minmax(0,1fr));}
}
