/**
 * Easy Estimates - Frontend styles.
 */
.wpeb-estimator {
  --wpeb-primary: #256d4a;
  --wpeb-primary-dark: #194c34;
  --wpeb-primary-soft: #cfe3d7;
  --wpeb-secondary: #315d83;
  --wpeb-secondary-dark: #254763;
  --wpeb-secondary-soft: #e0ebf3;
  --wpeb-totals-color: var(--wpeb-primary);
  --wpeb-totals-dark: var(--wpeb-primary-dark);
  --wpeb-totals-soft: var(--wpeb-accent);
  --wpeb-detail-color: var(--wpeb-primary);
  --wpeb-detail-dark: var(--wpeb-primary-dark);
  --wpeb-detail-soft: var(--wpeb-accent);
  --wpeb-accent: #e6f4ec;
  --wpeb-border: #dcdcde;
  --wpeb-muted: #646970;
  --wpeb-danger: #b32d2e;
  --wpeb-surface: #fff;
  --wpeb-soft: #f6f7f7;
  box-sizing: border-box;
}

.wpeb-estimator * {
  box-sizing: border-box;
}

/* Public estimator */

.wpeb-estimator {
  max-width: 1100px;
  margin: 14px auto;
  color: #26312c;
}

.wpeb-estimator-header {
  margin-bottom: 14px;
}

.wpeb-estimator-header h2 {
  margin-bottom: 8px;
}

.wpeb-estimator-header p {
  margin: 0;
  color: #59635e;
}

.wpeb-layout-shell {
  margin-bottom: 14px;
}

.wpeb-layout-sidebar {
  display: grid;
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.wpeb-layout-controls {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 14px;
}

.wpeb-layout-controls .wpeb-industry-selector,
.wpeb-layout-controls .wpeb-import-panel,
.wpeb-layout-controls .wpeb-quote-customer-panel,
.wpeb-layout-controls .wpeb-estimator-controls {
  margin-bottom: 0;
}

.wpeb-layout-controls .wpeb-industry-selector label,
.wpeb-layout-controls .wpeb-import-panel,
.wpeb-layout-controls .wpeb-quote-customer-panel {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.wpeb-layout-controls .wpeb-industry-selector select,
.wpeb-layout-controls .wpeb-unit-field,
.wpeb-layout-controls .wpeb-estimator-controls button,
.wpeb-layout-controls .wpeb-import-file-label,
.wpeb-layout-controls .wpeb-import-button {
  width: 100%;
}

.wpeb-layout-controls .wpeb-main-qty-row .wpeb-unit-field {
  width: 100%;
}

.wpeb-layout-controls .wpeb-quote-customer-panel {
  gap: 12px;
}

.wpeb-layout-is-stacked {
  max-width: 100%;
  overflow-x: hidden;
}

.wpeb-layout-is-stacked .wpeb-products,
.wpeb-layout-is-stacked .wpeb-category-content {
  max-width: 100%;
  overflow-x: auto;
}

.wpeb-layout-is-stacked .wpeb-import-panel,
.wpeb-layout-is-stacked .wpeb-quote-customer-panel,
.wpeb-layout-is-stacked .wpeb-estimator-controls {
  max-width: 100%;
  min-width: 0;
}

.wpeb-layout-is-stacked .wpeb-main-qty-row .wpeb-unit-field {
  max-width: 100%;
}

.wpeb-layout-is-stacked .wpeb-import-panel > *,
.wpeb-layout-is-stacked .wpeb-quote-customer-panel > *,
.wpeb-layout-is-stacked .wpeb-estimator-controls > *,
.wpeb-layout-is-stacked .wpeb-product-description {
  min-width: 0;
}

.wpeb-industry-selector {
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid #d9e1dc;
  border-radius: 9px;
  background: #f3f7f5;
}

.wpeb-industry-selector label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.wpeb-industry-selector select {
  min-width: 260px;
  min-height: 40px;
  padding: 7px 34px 7px 10px;
  border: 1px solid #b8c3bd;
  border-radius: 6px;
  background: #fff;
}

.wpeb-industry-selector p {
  margin: 8px 0 0;
  color: #68716c;
  font-size: 13px;
}

.wpeb-industry-explanation {
  margin-top: 14px;
  padding: 13px 15px;
  border-left: 4px solid var(--wpeb-primary);
  border-radius: 0 7px 7px 0;
  background: #fff;
  color: #35423b;
  font-size: 14px;
  line-height: 1.55;
}

.wpeb-industry-explanation > :first-child {
  margin-top: 0;
}

.wpeb-industry-explanation > :last-child {
  margin-bottom: 0;
}

.wpeb-industry-explanation a {
  color: var(--wpeb-primary);
  font-weight: 700;
}

.wpeb-import-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #d9e1dc;
  border-radius: 9px;
  background: #f8faf9;
}

.wpeb-import-panel > div {
  flex: 1 1 280px;
}

.wpeb-import-panel p {
  margin: 3px 0 0;
  color: #68716c;
  font-size: 13px;
}

.wpeb-import-file-label {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #b8c3bd;
  border-radius: 7px;
  background: #fff;
  color: #26342d;
  font-weight: 700;
  cursor: pointer;
}

.wpeb-import-file-label:hover {
  border-color: #71877b;
}

.wpeb-import-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.wpeb-estimator .wpeb-import-button {
  min-height: 40px;
  border-color: var(--wpeb-secondary);
  background: var(--wpeb-secondary);
}

.wpeb-import-status {
  flex-basis: 100%;
  min-height: 18px;
  color: #526159;
  font-size: 13px;
}

.wpeb-import-status.is-success {
  color: #237044;
}

.wpeb-import-status.is-error {
  color: #b42318;
}

.wpeb-quote-customer-panel {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) repeat(3, minmax(170px, 1fr));
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d9e1dc;
  border-radius: 10px;
  background: #f8faf9;
}

.wpeb-quote-customer-panel p {
  margin: 3px 0 0;
  color: #68716c;
  font-size: 13px;
}

.wpeb-quote-customer-panel label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #35483e;
  font-size: 13px;
  font-weight: 700;
}

.wpeb-quote-customer-panel input {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #b8c3bd;
  border-radius: 7px;
  background: #fff;
}

.wpeb-quote-customer-panel input:focus {
  border-color: var(--wpeb-primary);
  box-shadow: 0 0 0 2px rgba(37, 109, 74, 0.14);
  outline: 0;
}

.wpeb-category {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #d9e1dc;
  border-radius: 9px;
  background: #fff;
}

.wpeb-category-group {
  margin-bottom: 24px;
}

.wpeb-parent-category-title {
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--wpeb-primary);
  color: #fff;
  font-size: 17px;
}

.wpeb-category-depth-1,
.wpeb-category-depth-2,
.wpeb-category-depth-3 {
  margin-left: 18px;
}

.wpeb-category-group[hidden] {
  display: none !important;
}

.wpeb-category h3 {
  margin: 0;
  background: var(--wpeb-primary);
  color: #fff;
  font-size: 17px;
}

.wpeb-frontend-category-toggle,
.wpeb-frontend-group-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 13px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.wpeb-frontend-category-toggle:hover,
.wpeb-frontend-group-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
}

.wpeb-category-heading-title {
  min-width: 0;
  flex: 1 1 auto;
  color: #fff;
}

.wpeb-category-column-labels {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  margin-left: auto;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.wpeb-category-column-label {
  display: inline-block;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

.wpeb-category-qty-label {
  width: 150px;
}

.wpeb-category-price-label {
  width: 170px;
  text-align: left;
}

.wpeb-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 15px;
  line-height: 1;
}

.wpeb-category-content[hidden],
.wpeb-category-group-content[hidden] {
  display: none !important;
}

.wpeb-product-table {
  width: 100%;
  border-collapse: collapse;
}

.wpeb-product-table th,
.wpeb-product-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #edf0ee;
  text-align: left;
}

.wpeb-product-table tr:last-child td {
  border-bottom: 0;
}

.wpeb-product-table .wpeb-product-row {
  cursor: pointer;
}

.wpeb-product-table .wpeb-product-row:hover td {
  background: #fafcfb;
}

.wpeb-product-table .wpeb-product-row.is-selected td {
  background: var(--wpeb-accent);
}

.wpeb-linked-product-row[hidden],
.wpeb-category[hidden] {
  display: none !important;
}

.wpeb-product-check {
  width: 44px;
  text-align: center !important;
}

.wpeb-product-code {
  width: 180px;
  color: #53615a;
  white-space: nowrap;
}

.wpeb-product-description {
  position: relative;
}

.wpeb-product-description[data-wpeb-tooltip]::before,
.wpeb-product-description[data-wpeb-tooltip]::after,
.wpeb-unit-field[data-wpeb-tooltip]::before,
.wpeb-unit-field[data-wpeb-tooltip]::after {
  position: absolute;
  z-index: 30;
  left: 18px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
}

.wpeb-product-description[data-wpeb-tooltip]::before,
.wpeb-unit-field[data-wpeb-tooltip]::before {
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(420px, 85vw);
  padding: 16px 20px;
  border: 1px solid var(--wpeb-primary);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(25, 76, 52, 0.14);
  color: var(--wpeb-primary-dark);
  content: attr(data-wpeb-tooltip);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  text-align: left;
  white-space: normal;
  transform: translateY(5px);
}

.wpeb-product-description[data-wpeb-tooltip]::after,
.wpeb-unit-field[data-wpeb-tooltip]::after {
  bottom: calc(100% + 4px);
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--wpeb-primary);
  border-bottom: 1px solid var(--wpeb-primary);
  background: #fff;
  content: "";
  transform: translate(12px, 5px) rotate(45deg);
}

.wpeb-product-description[data-wpeb-tooltip]:hover::before,
.wpeb-product-description[data-wpeb-tooltip]:hover::after,
.wpeb-product-description[data-wpeb-tooltip]:focus::before,
.wpeb-product-description[data-wpeb-tooltip]:focus::after,
.wpeb-unit-field[data-wpeb-tooltip]:hover::before,
.wpeb-unit-field[data-wpeb-tooltip]:hover::after,
.wpeb-unit-field[data-wpeb-tooltip]:focus::before,
.wpeb-unit-field[data-wpeb-tooltip]:focus::after,
.wpeb-unit-field[data-wpeb-tooltip]:focus-within::before,
.wpeb-unit-field[data-wpeb-tooltip]:focus-within::after {
  opacity: 1;
  visibility: visible;
}

.wpeb-product-description[data-wpeb-tooltip]:hover::before,
.wpeb-product-description[data-wpeb-tooltip]:focus::before,
.wpeb-unit-field[data-wpeb-tooltip]:hover::before,
.wpeb-unit-field[data-wpeb-tooltip]:focus::before,
.wpeb-unit-field[data-wpeb-tooltip]:focus-within::before {
  transform: translateY(0);
}

.wpeb-product-description[data-wpeb-tooltip]:hover::after,
.wpeb-product-description[data-wpeb-tooltip]:focus::after,
.wpeb-unit-field[data-wpeb-tooltip]:hover::after,
.wpeb-unit-field[data-wpeb-tooltip]:focus::after,
.wpeb-unit-field[data-wpeb-tooltip]:focus-within::after {
  transform: translate(12px, 0) rotate(45deg);
}

.wpeb-product-description[data-wpeb-tooltip]:focus,
.wpeb-unit-field[data-wpeb-tooltip]:focus {
  outline: 2px solid rgba(37, 109, 74, 0.2);
  outline-offset: -2px;
}

.wpeb-floating-totals-content:hover,
.wpeb-floating-totals-content:focus {
  background: rgba(255, 255, 255, 0.52);
  outline: 0;
}

.wpeb-unit-field[data-wpeb-tooltip]::before {
  top: 50%;
  right: auto;
  bottom: auto;
  left: calc(100% + 14px);
  width: max-content;
  max-width: min(360px, calc(100vw - 40px));
  transform: translate(8px, -50%);
}

.wpeb-unit-field[data-wpeb-tooltip]::after {
  top: 50%;
  right: auto;
  bottom: auto;
  left: calc(100% + 8px);
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid var(--wpeb-primary);
  border-top: 1px solid var(--wpeb-primary);
  transform: translate(8px, -50%) rotate(-45deg);
}

.wpeb-unit-field[data-wpeb-tooltip]:hover::before,
.wpeb-unit-field[data-wpeb-tooltip]:focus::before,
.wpeb-unit-field[data-wpeb-tooltip]:focus-within::before {
  transform: translate(0, -50%);
}

.wpeb-unit-field[data-wpeb-tooltip]:hover::after,
.wpeb-unit-field[data-wpeb-tooltip]:focus::after,
.wpeb-unit-field[data-wpeb-tooltip]:focus-within::after {
  transform: translate(0, -50%) rotate(-45deg);
}

@media (max-width: 900px) {
  .wpeb-unit-field[data-wpeb-tooltip]::before {
    left: 0;
    top: auto;
    bottom: calc(100% + 10px);
    max-width: min(360px, 85vw);
    transform: translateY(5px);
  }

  .wpeb-unit-field[data-wpeb-tooltip]::after {
    left: 18px;
    top: auto;
    bottom: calc(100% + 4px);
    border-left: 0;
    border-top: 0;
    border-right: 1px solid var(--wpeb-primary);
    border-bottom: 1px solid var(--wpeb-primary);
    transform: translate(12px, 5px) rotate(45deg);
  }

  .wpeb-unit-field[data-wpeb-tooltip]:hover::before,
  .wpeb-unit-field[data-wpeb-tooltip]:focus::before,
  .wpeb-unit-field[data-wpeb-tooltip]:focus-within::before {
    transform: translateY(0);
  }

  .wpeb-unit-field[data-wpeb-tooltip]:hover::after,
  .wpeb-unit-field[data-wpeb-tooltip]:focus::after,
  .wpeb-unit-field[data-wpeb-tooltip]:focus-within::after {
    transform: translate(12px, 0) rotate(45deg);
  }
}

.wpeb-product-description-layout {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wpeb-product-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wpeb-product-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
}

.wpeb-product-info-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  padding: 3px 7px !important;
  min-height: 0 !important;
  border: 1px solid #b8c3bd !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--wpeb-primary) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  cursor: pointer;
}

.wpeb-product-info-toggle:hover {
  border-color: var(--wpeb-primary) !important;
  background: var(--wpeb-accent) !important;
}

.wpeb-product-long-description-row td {
  padding: 0 12px 9px 52px !important;
  border-bottom: 1px solid #edf0ee;
  background: #fafcfb;
}

.wpeb-product-long-description {
  padding: 9px 12px;
  border-left: 3px solid var(--wpeb-primary);
  color: #53615a;
  font-size: 13px;
  line-height: 1.55;
}

.wpeb-product-long-description-row[hidden] {
  display: none !important;
}

.wpeb-product-price {
  width: 170px;
  text-align: right !important;
  white-space: nowrap;
}

.wpeb-product-unit-quantity {
  width: 130px;
  text-align: center !important;
}

.wpeb-product-unit-quantity label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  color: #59635e;
  font-size: 12px;
  font-weight: 600;
}

.wpeb-unit-qty-input {
  width: 76px;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid #b8c3bd;
  border-radius: 5px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.wpeb-calculated-qty {
  display: inline-block;
  min-width: 40px;
  padding: 6px 8px;
  border-radius: 5px;
  background: #f3f7f5;
  color: #26312c;
  font-weight: 700;
}

.wpeb-no-qty {
  display: inline-block;
  min-width: 40px;
  min-height: 1px;
}

.wpeb-estimator-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 14px 0;
}

.wpeb-unit-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  font-weight: 700;
}

.wpeb-unit-input,
.wpeb-unit-input-2,
.wpeb-unit-input-3,
.wpeb-unit-input-4 {
  width: 110px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #b8c3bd;
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: #26312c;
  text-align: center;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: inset 0 1px 2px rgba(22, 46, 34, 0.05);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.wpeb-unit-input:hover,
.wpeb-unit-input-2:hover,
.wpeb-unit-input-3:hover,
.wpeb-unit-input-4:hover {
  border-color: #82978b;
}

.wpeb-unit-input:focus,
.wpeb-unit-input-2:focus,
.wpeb-unit-input-3:focus,
.wpeb-unit-input-4:focus {
  border-color: var(--wpeb-primary);
  box-shadow:
    0 0 0 3px rgba(37, 109, 74, 0.14),
    inset 0 1px 2px rgba(22, 46, 34, 0.04);
}

.wpeb-main-qty-controls {
  align-items: flex-start;
  flex-direction: column;
}

.wpeb-main-qty-row {
  width: 100%;
}

.wpeb-main-qty-row .wpeb-unit-field {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 360px);
}

.wpeb-action-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

@media (min-width: 901px) {
  .wpeb-product-table {
    table-layout: fixed;
  }

  .wpeb-product-check {
    width: 54px;
  }

  .wpeb-product-code {
    width: 150px;
  }

  .wpeb-product-unit-quantity {
    width: 150px;
  }

  .wpeb-product-price {
    width: 170px;
  }

  .wpeb-product-description-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 14px;
  }

  .wpeb-product-actions {
    justify-content: flex-start;
    min-width: 168px;
  }

  .wpeb-product-info-toggle {
    width: 78px;
    white-space: nowrap;
  }

  .wpeb-layout-is-stacked .wpeb-main-qty-row .wpeb-unit-field {
    width: 420px;
  }

  .wpeb-layout-is-stacked .wpeb-action-button-row button {
    flex: 0 0 240px;
    width: 240px;
    max-width: 100%;
  }

  .wpeb-layout-is-stacked .wpeb-action-button-row .wpeb-export-button,
  .wpeb-layout-is-stacked .wpeb-action-button-row .wpeb-pdf-button,
  .wpeb-layout-is-stacked .wpeb-action-button-row .wpeb-xml-button,
  .wpeb-layout-is-stacked .wpeb-action-button-row .wpeb-sie-button {
    flex-basis: 260px;
    width: 260px;
  }
}

/* Modern frontend product checkboxes */

.wpeb-product-check .wpeb-product-checkbox {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  width: 21px;
  height: 21px;
  margin: 0;
  border: 2px solid #9aaba2;
  border-radius: 6px;
  outline: none;
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.12s ease;
}

.wpeb-product-check .wpeb-product-checkbox::before {
  width: 10px;
  height: 6px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  content: "";
  opacity: 0;
  transform: rotate(-45deg) scale(0.6) translate(1px, -1px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.wpeb-product-check .wpeb-product-checkbox:hover {
  border-color: var(--wpeb-primary);
}

.wpeb-product-check .wpeb-product-checkbox:checked {
  border-color: var(--wpeb-primary);
  background: var(--wpeb-primary);
}

.wpeb-product-check .wpeb-product-checkbox:checked::before {
  opacity: 1;
  transform: rotate(-45deg) scale(1) translate(1px, -1px);
}

.wpeb-product-check .wpeb-product-checkbox:focus-visible {
  box-shadow: 0 0 0 4px rgba(37, 109, 74, 0.18);
}

.wpeb-product-check .wpeb-product-checkbox:active:not(:disabled) {
  transform: scale(0.92);
}

.wpeb-product-check .wpeb-product-checkbox:disabled {
  border-color: #79a68d;
  background-color: #79a68d;
  cursor: default;
  opacity: 0.82;
}

.wpeb-estimator button {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--wpeb-primary);
  border-radius: 6px;
  background: var(--wpeb-primary);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.wpeb-estimator button:hover {
  background: var(--wpeb-primary-dark);
}

.wpeb-estimator .wpeb-export-button {
  border-color: var(--wpeb-secondary);
  background: var(--wpeb-secondary);
}

.wpeb-estimator .wpeb-pdf-button {
  border-color: var(--wpeb-primary);
  background: var(--wpeb-primary);
}

.wpeb-estimator .wpeb-xml-button,
.wpeb-estimator .wpeb-sie-button {
  border-color: var(--wpeb-primary);
  background: var(--wpeb-primary);
}

.wpeb-estimator .wpeb-pdf-button:hover,
.wpeb-estimator .wpeb-pdf-button:focus,
.wpeb-estimator .wpeb-xml-button:hover,
.wpeb-estimator .wpeb-xml-button:focus,
.wpeb-estimator .wpeb-sie-button:hover,
.wpeb-estimator .wpeb-sie-button:focus {
  border-color: var(--wpeb-primary-dark);
  background: var(--wpeb-primary-dark);
}

.wpeb-estimator .wpeb-export-button:hover,
.wpeb-estimator .wpeb-export-button:focus,
.wpeb-estimator .wpeb-import-button:hover,
.wpeb-estimator .wpeb-import-button:focus {
  border-color: var(--wpeb-secondary-dark);
  background: var(--wpeb-secondary-dark);
}

.wpeb-estimator .wpeb-reset-button {
  border: 1px solid #9aa9a1;
  background: #fff;
  color: #34483d;
}

.wpeb-estimator .wpeb-reset-button:hover,
.wpeb-estimator .wpeb-reset-button:focus {
  border-color: var(--wpeb-primary);
  background: var(--wpeb-accent);
  color: var(--wpeb-primary-dark);
}

.wpeb-estimator-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 18px;
  background: transparent;
}

.wpeb-result-card {
  padding: 13px 16px;
  border: 1px solid #d9e1dc;
  border-radius: 9px;
  background: #fff;
}

.wpeb-totals-card {
  border-color: var(--wpeb-totals-color);
  background: var(--wpeb-totals-soft);
}

.wpeb-detail-card {
  border-color: var(--wpeb-detail-color);
  background: var(--wpeb-detail-soft);
}


.wpeb-result-card-wide {
  grid-column: 1 / -1;
}

.wpeb-result-card h3 {
  margin: 0 0 12px;
}

.wpeb-totals-card {
  padding: 0;
  overflow: hidden;
}

.wpeb-totals-card h3 {
  margin: 0;
  padding: 14px 16px;
  background: var(--wpeb-totals-color);
  color: #fff;
}

.wpeb-front-totals-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(120px, 1fr));
  align-items: stretch;
}

.wpeb-front-totals-grid > * {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  padding: 10px 14px;
  border-top: 1px solid #e7ece9;
}

.wpeb-front-totals-head {
  background: var(--wpeb-totals-color);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: right;
  text-transform: uppercase;
}

.wpeb-front-totals-head:first-child {
  justify-content: flex-start;
}

.wpeb-front-totals-label {
  justify-content: flex-start;
  background: var(--wpeb-totals-soft);
  color: var(--wpeb-totals-dark);
  font-weight: 800;
}

.wpeb-front-totals-grid strong {
  color: #1f3028;
  font-size: 16px;
  font-weight: 800;
  text-align: right;
}

.wpeb-detail-card {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
}

.wpeb-detail-card h3 {
  margin: 0;
  background: var(--wpeb-detail-color);
  color: #fff;
  font-size: 17px;
}

.wpeb-estimator .wpeb-estimate-detail-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 13px;
  border: 0;
  background: var(--wpeb-detail-color);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.wpeb-estimator .wpeb-estimate-detail-toggle:hover,
.wpeb-estimator .wpeb-estimate-detail-toggle:focus {
  background: var(--wpeb-detail-dark);
  color: #fff;
}

.wpeb-estimate-detail-content {
  padding: 14px;
  background: linear-gradient(180deg, #fff 0%, var(--wpeb-detail-soft) 100%);
}

.wpeb-estimate-detail-content[hidden] {
  display: none !important;
}

.wpeb-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.wpeb-detail-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--wpeb-detail-color);
  border-radius: 10px;
  background: #fff;
  color: #33473c;
  font-weight: 800;
}

.wpeb-detail-summary-item strong {
  color: var(--wpeb-detail-dark);
  white-space: nowrap;
}

.wpeb-detail-section-title {
  margin: 16px 0 8px;
  color: #526259;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wpeb-detail-summary + [data-product-results] .wpeb-detail-section-title {
  margin-top: 4px;
}

.wpeb-detail-category-group {
  --wpeb-detail-columns: minmax(220px, 1.7fr) minmax(120px, 0.7fr) minmax(70px, 0.4fr) minmax(120px, 0.75fr) minmax(130px, 0.85fr);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #dfe7e2;
  border-radius: 10px;
  background: #fff;
}

.wpeb-detail-category-heading {
  padding: 9px 12px;
  background: var(--wpeb-detail-color);
  color: #fff;
  font-weight: 800;
}

.wpeb-detail-table-head {
  display: grid;
  grid-template-columns: var(--wpeb-detail-columns);
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: var(--wpeb-detail-soft);
  color: var(--wpeb-detail-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wpeb-detail-table-head span,
.wpeb-detail-line > * {
  min-width: 0;
}

.wpeb-detail-table-head span:nth-child(3),
.wpeb-detail-table-head span:nth-child(4),
.wpeb-detail-table-head span:nth-child(5) {
  text-align: right;
}

.wpeb-detail-line {
  display: grid;
  grid-template-columns: var(--wpeb-detail-columns);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #e5ebe8;
  border-radius: 0;
  background: #fff;
}

.wpeb-detail-line + .wpeb-detail-line {
  margin-top: 0;
}

.wpeb-detail-rule-line {
  background: #f9fbfa;
}

.wpeb-detail-name {
  color: #26382f;
  font-weight: 700;
}

.wpeb-detail-frequency {
  justify-self: start;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--wpeb-detail-soft);
  color: var(--wpeb-detail-dark);
  font-size: 12px;
  font-weight: 800;
}

.wpeb-detail-calculation {
  color: #1f3028;
  font-weight: 800;
  text-align: right;
}

.wpeb-detail-qty,
.wpeb-detail-unit-price {
  color: #26382f;
  font-weight: 700;
  text-align: right;
}

.wpeb-result-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 0;
  border-bottom: 1px dotted #c9d0cc;
}

.wpeb-result-line:last-child {
  border-bottom: 0;
}

.wpeb-result-line strong {
  text-align: right;
}

.wpeb-result-total {
  font-size: 18px;
  font-weight: 700;
}

.wpeb-tax-note,
.wpeb-contact-note {
  margin-top: 14px;
  color: #68716c;
  font-size: 13px;
}

.wpeb-contact-note a {
  font-weight: 700;
}

.wpeb-floating-totals {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 9998;
  display: flex;
  align-items: stretch;
  max-width: min(205px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--wpeb-totals-color);
  border-radius: 16px;
  background: var(--wpeb-totals-soft);
  box-shadow: 0 16px 34px rgba(20, 34, 27, 0.2);
  color: var(--wpeb-totals-dark);
  transform: translateY(-50%);
}

.wpeb-estimator .wpeb-floating-totals-toggle {
  min-height: auto;
  width: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--wpeb-totals-color);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.wpeb-estimator .wpeb-floating-totals-toggle:hover,
.wpeb-estimator .wpeb-floating-totals-toggle:focus {
  background: var(--wpeb-totals-dark);
  color: #fff;
}

.wpeb-floating-totals-content {
  display: grid;
  gap: 8px;
  min-width: 142px;
  padding: 9px 11px;
  cursor: pointer;
}

.wpeb-floating-total-row {
  display: block;
}


.wpeb-floating-total-row small,
.wpeb-floating-tax-mode {
  display: block;
  color: var(--wpeb-totals-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.wpeb-floating-total-row strong {
  display: block;
  color: #1f3028;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.wpeb-floating-tax-mode {
  padding-top: 2px;
  text-align: left;
}

.wpeb-floating-totals.is-minimised .wpeb-floating-totals-content {
  display: none;
}

.wpeb-floating-totals.is-minimised {
  border-radius: 999px 0 0 999px;
}

@media (max-width: 782px) {
  .wpeb-floating-totals {
    right: 10px;
    max-width: calc(100vw - 20px);
  }

  .wpeb-floating-totals-content {
    min-width: 140px;
    padding: 8px 10px;
  }

  .wpeb-floating-total-row strong {
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .wpeb-layout-sidebar {
    grid-template-columns: 1fr;
  }

  .wpeb-layout-controls {
    position: static;
  }

  .wpeb-quote-customer-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 700px) {
  .wpeb-estimator {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .wpeb-layout-is-stacked .wpeb-industry-selector,
  .wpeb-layout-is-stacked .wpeb-import-panel,
  .wpeb-layout-is-stacked .wpeb-quote-customer-panel {
    padding-right: 10px;
    padding-left: 10px;
  }

  .wpeb-layout-is-stacked .wpeb-category-depth-1,
  .wpeb-layout-is-stacked .wpeb-category-depth-2,
  .wpeb-layout-is-stacked .wpeb-category-depth-3 {
    margin-left: 0;
  }

  .wpeb-layout-is-stacked .wpeb-parent-category-title {
    padding-left: 0;
  }

  .wpeb-layout-choice-grid {
    grid-template-columns: 1fr;
  }

  .wpeb-layout-choice {
    grid-template-columns: 22px minmax(72px, 92px) minmax(0, 1fr);
    gap: 10px;
    min-height: 128px;
    padding: 13px;
  }

  .wpeb-layout-outline {
    width: 100%;
    height: 88px;
    gap: 5px;
    padding: 8px;
  }

  .wpeb-layout-choice-copy strong {
    font-size: 13px;
  }


  .wpeb-quote-customer-panel {
    grid-template-columns: 1fr;
  }



  .wpeb-estimator-results,
  .wpeb-front-totals-grid {
    grid-template-columns: 1fr;
  }

  .wpeb-front-totals-head:first-child {
    display: none;
  }

  .wpeb-front-totals-head {
    display: none;
  }

  .wpeb-front-totals-label {
    border-top: 1px solid #dce5e0;
    background: var(--wpeb-totals-color);
    color: #fff;
  }

  .wpeb-front-totals-label + strong::before {
    content: "TOTAL EXCLUDING VAT";
    margin-right: auto;
    color: #5c6b62;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
  }

  .wpeb-front-totals-label + strong + strong::before {
    content: "TOTAL VAT";
    margin-right: auto;
    color: #5c6b62;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
  }

  .wpeb-front-totals-label + strong + strong + strong::before {
    content: "TOTALS INCLUDING";
    margin-right: auto;
    color: #5c6b62;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
  }

  .wpeb-detail-summary,
  .wpeb-detail-line {
    grid-template-columns: 1fr;
  }

  .wpeb-detail-table-head {
    display: none;
  }

  .wpeb-detail-line {
    gap: 7px;
    padding: 12px;
  }

  .wpeb-detail-qty,
  .wpeb-detail-unit-price,
  .wpeb-detail-calculation {
    text-align: left;
  }

  .wpeb-detail-qty::before {
    content: "Qty: ";
    color: #66756d;
    font-weight: 800;
  }

  .wpeb-detail-unit-price::before {
    content: "Unit Price: ";
    color: #66756d;
    font-weight: 800;
  }

  .wpeb-detail-calculation::before {
    content: "Total Price: ";
    color: #66756d;
    font-weight: 800;
  }


  .wpeb-product-code {
    display: none;
  }

  .wpeb-product-table th,
  .wpeb-product-table td {
    padding: 9px 6px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .wpeb-product-check {
    width: 32px;
  }

  .wpeb-product-check .wpeb-product-checkbox {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
  }

  .wpeb-product-long-description-row td {
    padding-left: 32px !important;
  }

  .wpeb-category-column-labels {
    gap: 8px;
    font-size: 11px;
  }

  .wpeb-category-qty-label,
  .wpeb-category-price-label {
    width: auto;
  }

  .wpeb-product-description-layout {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .wpeb-product-actions {
    gap: 6px;
  }

  .wpeb-product-info-toggle {
    width: auto;
  }

  .wpeb-action-button-row button {
    width: 100%;
  }

  .wpeb-product-price {
    width: 92px;
    font-size: 12px;
  }

  .wpeb-product-unit-quantity {
    width: 86px;
  }

  .wpeb-unit-qty-input {
    width: 58px;
  }
}


.wpeb-sie-sort-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: inherit;
  font-weight: 600;
}

.wpeb-sie-sort-field span {
  font-size: 0.9rem;
  white-space: nowrap;
}

.wpeb-sie-sort-field select {
  min-width: 120px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--wpeb-border);
  border-radius: 999px;
  background-color: #fff;
  color: var(--wpeb-text);
}

@media (max-width: 640px) {
  .wpeb-sie-sort-field {
    width: 100%;
    justify-content: space-between;
  }

  .wpeb-sie-sort-field select {
    flex: 1;
    min-width: 0;
  }
}


.wpeb-sie-export-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.wpeb-layout-is-stacked .wpeb-action-button-row .wpeb-sie-export-group {
  flex-basis: auto;
  width: auto;
}

.wpeb-layout-is-stacked .wpeb-action-button-row .wpeb-sie-export-group .wpeb-sie-button {
  flex: 0 0 260px;
  width: 260px;
}

@media (max-width: 640px) {
  .wpeb-sie-export-group {
    width: 100%;
    flex-wrap: wrap;
    white-space: normal;
  }

  .wpeb-layout-is-stacked .wpeb-action-button-row .wpeb-sie-export-group .wpeb-sie-button {
    flex: 1 1 100%;
    width: 100%;
  }
}
