:root {
  --wptb-navy: #0b2748;
  --wptb-blue: #00a3e0;
  --wptb-light: #e8f4fb;
  --wptb-text: #0f172a;
  --wptb-muted: #4a6076;
  --wptb-border: #d9e1ec;
  --wptb-accent: #1cc0f3;
}

.wptb-wrapper {
  position: relative;
  font-family: 'CeraPRO', sans-serif;
}

.wptb-embedded .wptb-open-btn {
  display: none !important;
}

.wptb-open-btn {
  background: linear-gradient(135deg, var(--wptb-blue), #0f74d6);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(12, 31, 58, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 700;
}

.wptb-open-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(12, 31, 58, 0.36);
}

.wptb-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  overflow: visible;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  z-index:  10000000;
}

.wptb-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.wptb-overlay.active.closing {
  opacity: 0;
  visibility: visible;
  transition: opacity 0.2s ease;
}

/* When enabled, block mobile menu interaction while the toolbox is open */
body.wptb-toolbox-open.wptb-block-menu .mobile-nav.wd-opened,
body.wptb-toolbox-open.wptb-block-menu .wd-side-hidden.wd-opened,
body.wptb-toolbox-open.wptb-block-menu .wd-side-hidden-nav.wd-opened,
body.wptb-toolbox-open.wptb-block-menu .wd-side-hidden-overlay,
body.wptb-toolbox-open.wptb-block-menu .wd-side-hidden-close,
body.wptb-toolbox-open.wptb-block-menu .wd-side-hidden-cover,
body.wptb-toolbox-open.wptb-block-menu .wd-close-side,
body.wptb-toolbox-open.wptb-block-menu .wd-close-side-menu {
  pointer-events: none !important;
}

body.wptb-toolbox-open {
  overflow: visible !important;
  position: static !important;
  touch-action: auto !important;
}

html.wptb-toolbox-open {
  overflow: visible !important;
  position: static !important;
  height: auto !important;
  touch-action: auto !important;
}

body.wptb-toolbox-open .wptb-modal,
body.wptb-toolbox-open .wptb-modal * {
  pointer-events: auto !important;
  touch-action: auto !important;
}

body.wptb-toolbox-open .wptb-header {
  touch-action: none !important;
}

  .wptb-modal {
    pointer-events: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    background: #fff;
    width: 430px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 10000001;
    transition: opacity 0.2s ease;
  }

  .wptb-overlay.active .wptb-modal {
    pointer-events: auto;
    opacity: 1;
  }

  .wptb-overlay.active.closing .wptb-modal {
    opacity: 0;
    pointer-events: none;
  }

  .wptb-hidden {
    display: none !important;
  }

.wptb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--wptb-border);
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: grab;
    touch-action: none;
  }

.wptb-modal.wptb-dragging {
  user-select: none;
}

.wptb-modal.wptb-dragging .wptb-header {
  cursor: grabbing;
}

.wptb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wptb-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.wptb-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wptb-text);
}

.wptb-close {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  color: var(--wptb-muted, #4a6076);
}

.wptb-close-icon {
  width: 25px;
  height: 25px;
  display: block;
  background: transparent url("../svgviewer-output.png") center / contain no-repeat;
  flex: 0 0 auto;
}

.wptb-section {
  padding: 12px 16px;
  color: #fff;
}

.wptb-accordion {
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.wptb-wrapper .wptb-accordion:hover,
.wptb-wrapper .wptb-accordion:active,
.wptb-wrapper .wptb-accordion:focus,
.wptb-wrapper .wptb-accordion:focus-visible {
  color: #fff !important;
}

.wptb-section-dark {
  background: linear-gradient(135deg, var(--wptb-navy), #0c335c);
}

.wptb-section-blue {
  background: linear-gradient(135deg, var(--wptb-blue), var(--wptb-accent));
}

.wptb-accordion,
.wptb-accordion .wptb-section-title,
.wptb-accordion .wptb-icons,
.wptb-accordion .wptb-icon,
.wptb-accordion .wptb-icon-btn {
  color: #fff !important;
}

.wptb-section-body {
    padding: 16px 16px 6px;
    border-bottom: 1px solid var(--wptb-border);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

.wptb-section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wptb-section-title {
  font-weight: 800;
  letter-spacing: 0.5px;
}

.wptb-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wptb-icon {
  font-weight: 800;
  font-size: 18px;
}

.wptb-icon-btn {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.wptb-wrapper .wptb-icon-btn:hover,
.wptb-wrapper .wptb-icon-btn:active,
.wptb-wrapper .wptb-icon-btn:focus,
.wptb-wrapper .wptb-icon-btn:focus-visible {
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.wptb-wrapper .wptb-close:hover,
.wptb-wrapper .wptb-close:active,
.wptb-wrapper .wptb-close:focus,
.wptb-wrapper .wptb-close:focus-visible {
  color: var(--wptb-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.wptb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--wptb-text);
  font-weight: 700;
}
.wptb-field > span {
  padding-left: 2px;
  margin-bottom: -4px;
}

.wptb-field-inline {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    max-width: 420px;
  }

.wptb-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.wptb-select-row .wptb-field-inline {
  flex: 1;
  max-width: none;
}


.wptb-select-row .wptb-field-inline {
  flex: 1;
  max-width: none;
}


.wptb-select-row .wptb-field-inline {
  flex: 1;
  max-width: none;
}


.wptb-select-row .wptb-field-inline {
  flex: 1;
  max-width: none;
}

.wptb-favorites {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.wptb-select,
.wptb-input {
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: 'CeraPRO', sans-serif;
  width: 100%;
  height: 46px;
  line-height: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.wptb-input[type="number"] {
  text-align: center;
}

/* Hide native spin buttons on number inputs */
.wptb-input[type='number']::-webkit-inner-spin-button,
.wptb-input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.wptb-input[type='number'] {
  -moz-appearance: textfield;
}

/* Dropdown option font */
.wptb-select option {
  font-family: Arial, Helvetica, sans-serif;
}

/* General grid to align inputs/selects with equal sizing */
.wptb-select:focus,
.wptb-input:focus {
  outline: none;
  border-color: var(--wptb-blue);
  box-shadow: 0 0 0 3px rgba(38, 138, 243, 0.2);
  }

.wptb-body {
    padding: 18px 16px 20px;
    flex: 1;
    overflow: visible;
  }

.wptb-body-yellow {
  background: linear-gradient(180deg, #ffffff 0%, var(--wptb-light) 100%);
}

.wptb-block-title {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.4px;
  color: var(--wptb-navy);
  text-transform: uppercase;
}

.wptb-lead {
  margin: 6px 0 16px;
  color: var(--wptb-text);
  line-height: 1.5;
}

.wptb-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wptb-group {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(12, 31, 58, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.wptb-group-title {
  font-weight: 800;
  color: var(--wptb-navy);
  margin-bottom: 8px;
  display: none;
}

/* Keep group titles only for flow-rate subgroups */
[data-group-key="volumetric"] > .wptb-group-title,
[data-group-key="linear"] > .wptb-group-title {
  display: block;
}

.wptb-filter {
  margin-top: 12px;
}

.wptb-fields {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 12px;
}

.wptb-arrow {
  font-size: 26px;
  color: var(--wptb-text);
  text-align: center;
  margin-bottom: 10px;
}

.wptb-number {
  max-width: 100%;
}

.wptb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wptb-calc-btn {
  background: var(--wptb-blue);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(12, 31, 58, 0.25);
}

.wptb-calc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(12, 31, 58, 0.3);
}

.wptb-helper {
  font-size: 13px;
  color: var(--wptb-navy);
  font-weight: 600;
  padding-left: 4px;
  margin-bottom: -18px;
}

/* In the filter capacity form, keep the note closer to the result box */
.wptb-filter-form .wptb-helper {
  margin-bottom: -7px;
}

/* Filter capacity results layout */
.wptb-filter-form .wptb-result {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px 12px;
  margin-top: 8px;
}

.wptb-filter-form .wptb-result-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--wptb-navy);
}

.wptb-filter-form .wptb-result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: nowrap;
}

.wptb-filter-form .wptb-result-value {
  font-size: 22px;
  font-weight: 900;
  flex: 0 1 auto;
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.wptb-filter-form .wptb-result-unit {
  flex: 0 0 auto;
  width: auto;
  min-width: 3.25rem;
  border: none;
  background: transparent;
  padding: 0 22px 0 0;
  height: 24px;
  line-height: 24px;
  font-size: 15px;
  font-weight: 900;
  font-family: 'CeraPRO', sans-serif;
  color: var(--wptb-text);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20'%3E%3Cpath fill='%230f172a' d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px top 50%;
  background-size: 16px 16px;
}

.wptb-filter-form .wptb-result-unit:focus {
  outline: none;
}

/* Hide static result label text; only show the value */
.wptb-result-label {
  display: none;
}
.wptb-result {
  margin-top: 4px;
  padding: 14px;
  border: 1px solid rgba(12, 31, 58, 0.12);
  border-radius: 12px;
  background: #f7fbff;
  font-size: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: inherit;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.wptb-result-label {
  font-weight: 800;
  color: var(--wptb-text);
}

.wptb-result-value {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-weight: 800;
  color: var(--wptb-text);
}

.wptb-result-prefix {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.85;
}

.wptb-result-main {
  font-size: 20px;
  font-weight: 800;
}

.wptb-copy-btn {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: none !important;
  background: transparent url("../copy.png") center / 22px 22px no-repeat !important;
  box-shadow: none !important;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}

/* Compact copy button for filter results */
.wptb-filter-form .wptb-copy-btn {
  width: 32px;
  height: 32px;
  background-size: 18px 18px;
}

.wptb-copy-btn:hover,
.wptb-copy-btn:active,
.wptb-copy-btn:focus,
.wptb-copy-btn:focus-visible {
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
  opacity: 1 !important;
}

.wptb-copy-btn[data-copied='true'] {
  filter: none !important;
}

.wptb-copy-feedback {
  margin: 6px 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--wptb-navy);
}

.wptb-coming {
  padding: 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  font-weight: 600;
}

.wptb-favorites {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.wptb-fav-pill {
  background: #e0f2ff;
  color: #0b2748;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #b8daff;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}

.wptb-heart-btn {
    background: transparent;
    border: 0;
    color: #fff;
    width: 65px;
    height: 65px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI Symbol', 'Arial', sans-serif;
    font-size: 30px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    border-radius: 12px;
    transition: none;
    -webkit-text-stroke: 0;
  }

.wptb-heart-btn:hover,
.wptb-heart-btn:active,
.wptb-heart-btn:focus,
.wptb-heart-btn:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.wptb-filter-form .wptb-fields {
  display: grid;
  grid-template-columns: 1fr 1fr !important;
  align-items: center;
  gap: 18px 20px;
}



.wptb-filter-form .wptb-field {
  width: 100%;
  min-width: 0;
  margin-bottom: 35px;
}



  .wptb-heart-btn.active {
    background: transparent;
    border: 0;
    color: var(--wptb-blue);
    font-family: 'Segoe UI Symbol', 'Arial', sans-serif;
    font-size: 30px;
    font-weight: 700;
    -webkit-text-stroke: 0;
  }

.wptb-heart-icon {
  width: 65px;
  height: 65px;
  display: block;
}

.wptb-body.wptb-body-collapsed {
  display: none;
}

@media (max-width: 540px) {
  .wptb-modal {
    width: 95vw;
    max-width: 95vw;
    height: auto;
  }

  .wptb-fields {
    grid-template-columns: 1fr;
  }

  .wptb-arrow {
    display: none;
  }
}

@keyframes wptb-fade-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.wptb-number input {
  width: 100%;
  box-sizing: border-box;
}

.wptb-filter-form select, .wptb-filter-form input { width: 100%; min-width: 0; box-sizing: border-box; }

.wptb-filter-form .wptb-field > span {
  display: inline-block;
  margin-bottom: -4px;
  padding-left: 4px;
}

/* Conductivity 2x2 grid with equal widths */
[data-group-key="conductivity"] .wptb-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 10px;
  align-items: flex-start;
  justify-items: stretch;
}
[data-conductivity-extra="true"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 10px;
  align-items: flex-start;
  justify-items: stretch;
}
[data-group-key="conductivity"] .wptb-fields .wptb-input,
[data-group-key="conductivity"] .wptb-fields .wptb-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
}
[data-conductivity-extra="true"] .wptb-input,
[data-conductivity-extra="true"] .wptb-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
}

/* Mesh size grid */
[data-group-key="mesh_size"] .wptb-fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 12px;
  row-gap: 0;
  align-items: end;
  justify-items: stretch;
}
[data-group-key="mesh_size"] .wptb-fields .wptb-input,
[data-group-key="mesh_size"] .wptb-fields .wptb-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
}

@media (max-width: 540px) {
  [data-group-key="mesh_size"] .wptb-fields {
    grid-template-columns: 1fr auto 1fr;
    row-gap: 0;
    align-items: end;
  }
  [data-group-key="mesh_size"] .wptb-arrow {
    display: block;
  }
}

/* Conductivity notes styling */
.wptb-cond-notes .wptb-note {
  font-size: 13px;
  text-align: justify;
  margin: 0 0 6px;
  padding-left: 4px;
}


