.emt-pathway-fill__toolbar,
.emt-pathway-fill__row-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.emt-pathway-fill__toolbar {
  margin-bottom: 18px;
}

.emt-pathway-fill__template-select {
  flex: 1 1 620px;
}

.emt-pathway-fill__row-actions {
  align-items: center;
  margin-top: 16px;
}

.emt-pathway-fill__row-actions p {
  margin: 0;
  color: var(--emt-calc-muted);
  font-size: 14px;
}

.emt-pathway-cable-list {
  display: grid;
  gap: 16px;
}

.emt-pathway-cable {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--emt-calc-line);
  border-radius: var(--emt-calc-radius-small);
  background: var(--emt-calc-bg);
}

.emt-pathway-cable > legend {
  padding: 0 8px;
  font-weight: 800;
}

.emt-pathway-cable__remove {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--emt-calc-danger);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.emt-pathway-cable__remove:hover,
.emt-pathway-cable__remove:focus-visible {
  background: #fff0f0;
  outline: none;
}

.emt-pathway-cable__subtotal {
  margin: 14px 0 0 !important;
  color: var(--emt-calc-muted);
}

.emt-pathway-cable__subtotal strong {
  color: var(--emt-calc-text);
}

.emt-pathway-fill__stale {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #dcc66b;
  border-radius: 11px;
  background: #fff9df;
  color: #5e4b00;
  font-weight: 700;
}

.emt-pathway-fill__status {
  margin-top: 18px;
  padding: 18px 20px;
  border-left: 5px solid var(--emt-calc-accent);
  border-radius: 0 var(--emt-calc-radius-small) var(--emt-calc-radius-small) 0;
  background: #fff8df;
}

.emt-pathway-fill__status--ok {
  border-left-color: var(--emt-calc-success);
  background: #eef9f4;
}

.emt-pathway-fill__status--warning {
  border-left-color: #b88100;
  background: #fff7dd;
}

.emt-pathway-fill__status--danger {
  border-left-color: var(--emt-calc-danger);
  background: #fff1f1;
}

.emt-pathway-fill__status p:last-child {
  margin-bottom: 0;
}

.emt-pathway-fill__formula {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--emt-calc-line);
  border-radius: var(--emt-calc-radius-small);
  background: #fff;
}

.emt-pathway-fill__formula p:last-child {
  margin-bottom: 0;
}

.emt-pathway-fill__warning-list {
  margin: 18px 0 0;
  padding: 18px 20px 18px 42px;
  border: 1px solid #e2c35a;
  border-radius: var(--emt-calc-radius-small);
  background: #fff9df;
}

.emt-pathway-fill__warning-list li + li {
  margin-top: 8px;
}

@media (max-width: 820px) {
  .emt-pathway-fill__toolbar,
  .emt-pathway-fill__row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .emt-pathway-fill__toolbar .emt-button,
  .emt-pathway-fill__row-actions .emt-button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .emt-pathway-cable {
    padding: 18px;
  }

  .emt-pathway-cable__remove {
    position: static;
    display: block;
    margin: 0 0 14px auto;
  }
}

@media (max-width: 700px) {
  .emt-pathway-fill .emt-result-table-wrap {
    overflow: visible;
    border: 0;
  }

  .emt-pathway-fill .emt-result-table-wrap table,
  .emt-pathway-fill .emt-result-table-wrap thead,
  .emt-pathway-fill .emt-result-table-wrap tbody,
  .emt-pathway-fill .emt-result-table-wrap tr,
  .emt-pathway-fill .emt-result-table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .emt-pathway-fill .emt-result-table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .emt-pathway-fill .emt-result-table-wrap tr {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--emt-calc-line);
    border-radius: 12px;
    background: #fff;
  }

  .emt-pathway-fill .emt-result-table-wrap td {
    display: grid;
    grid-template-columns: minmax(105px, .85fr) minmax(0, 1.15fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
  }

  .emt-pathway-fill .emt-result-table-wrap td::before {
    content: attr(data-label);
    color: var(--emt-calc-muted);
    font-size: 13px;
    font-weight: 800;
  }
}

@media print {
  .emt-pathway-fill .emt-calculator__form,
  .emt-pathway-fill .emt-result__actions,
  .emt-pathway-fill .emt-copy-status {
    display: none !important;
  }

  .emt-pathway-fill .emt-result {
    box-shadow: none;
  }
}

.emt-pathway-fill__high-confirm {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #d6aa22;
  border-radius: var(--emt-calc-radius-small);
  background: #fff8dc;
  color: #4d3c00;
  font-weight: 700;
}

.emt-pathway-fill__high-confirm[hidden] {
  display: none !important;
}

.emt-pathway-fill__high-confirm input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #a77700;
}

.emt-pathway-fill__formula strong {
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .emt-pathway-fill__high-confirm {
    padding: 14px;
  }
}
