.sfadb-ecu-card {
  margin: 22px 0 18px;
  padding: 18px;
  border: 1px solid #d8e4f0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(18, 50, 82, .07);
}

.sfadb-config-section + .sfadb-config-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e3ebf3;
}

.sfadb-config-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.sfadb-config-heading .sfadb-config-step {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f3ff;
  color: #176fc9;
  font-size: 14px;
  font-weight: 700;
}

.sfadb-config-heading h2 {
  margin: 0 0 3px;
  color: #071a37;
  font-size: 16px;
  line-height: 1.3;
}

.sfadb-config-heading p {
  margin: 0;
  color: #687991;
  font-size: 12px;
  line-height: 1.45;
}

.ecutable-main {
  width: 100%;
  max-height: 285px;
  padding-right: 4px;
  overflow: auto;
  scrollbar-color: #a9c7e5 #edf3f8;
  scrollbar-width: thin;
}

.ecutable-main::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.ecutable-main::-webkit-scrollbar-track {
  background: #edf3f8;
}

.ecutable-main::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #a9c7e5;
}

.eculisttable {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
}

.eculisttable th {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: 6px 12px;
  background: #fff;
  color: #708198;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .035em;
  text-align: left;
  text-transform: uppercase;
}

.eculisttable th:first-child,
.eculisttable td:first-child {
  width: 48px;
  text-align: center;
}

.eculisttable th:nth-child(2),
.eculisttable td:nth-child(2) {
  width: 30%;
}

.eculisttable td:nth-child(2) {
  font-weight: 700;
}

.eculisttable tbody tr {
  cursor: pointer;
  outline: 0;
}

.eculisttable td {
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #dce6f0;
  background: #fff;
  color: #13233b;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: background-color .18s ease, color .18s ease;
}

.eculisttable td:first-child {
  border-left: 0;
}

.eculisttable td:last-child {
  border-right: 0;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}

.eculisttable tbody tr:last-child td {
  border-bottom: 0;
}

.eculisttable tbody tr:hover td,
.eculisttable tbody tr:focus td {
  background: #f6faff;
}

.eculisttable tbody tr.selected-ecu td {
  background: #edf6ff;
  color: #0d559e;
}

.eculisttable tbody tr.selected-ecu td:first-child {
  box-shadow: inset 3px 0 #176fc9;
}

.sfadb-ecu-select input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.sfadb-ecu-select label {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid #b6c5d5;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.sfadb-ecu-select label::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #176fc9;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .18s ease, transform .18s ease;
}

.sfadb-ecu-select input:focus + label {
  box-shadow: 0 0 0 3px rgba(23, 111, 201, .16);
}

.sfadb-ecu-select input:checked + label {
  border-color: #176fc9;
}

.sfadb-ecu-select input:checked + label::after {
  opacity: 1;
  transform: scale(1);
}

.form-container .sfadb-config-section select {
  height: 46px;
  margin: 0;
  padding: 0 42px 0 14px;
  border-color: #cfdeec;
  background-color: #fff;
  color: #13233b;
  font-weight: 600;
  line-height: 46px;
}

.form-container .sfadb-config-section select:focus {
  border-color: #176fc9;
  box-shadow: 0 0 0 3px rgba(23, 111, 201, .12);
  outline: 0;
}

.sfadb-lcs-options {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d6e4f2;
  background: #f7fbff;
}

.sfadb-lcs-options[hidden],
.sfadb-modal[hidden] {
  display: none !important;
}

.sfadb-lcs-copy {
  margin-bottom: 8px;
}

.sfadb-lcs-copy strong {
  color: #071a37;
  font-size: 14px;
}

.sfadb-lcs-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.form-container .sfadb-option-button {
  position: relative;
  width: auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #c9d9e9;
  border-radius: 3px;
  background: #fff;
  color: #18324f;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.form-container .sfadb-option-button:hover:not(:disabled) {
  border-color: #7db5e8;
  background: #eef7ff;
  color: #176fc9;
}

.form-container .sfadb-option-button.is-active,
.form-container .sfadb-option-button.is-active:hover:not(:disabled),
.form-container .sfadb-option-button.is-active:focus:not(:disabled) {
  border-color: #176fc9;
  background: #176fc9;
  color: #fff;
}

.form-container .sfadb-option-button.is-configured::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25a957;
}

.form-container .sfadb-option-button:disabled {
  border-color: #e0e7ef;
  background: #f2f5f8;
  color: #9aa7b5;
  cursor: not-allowed;
}

.sfadb-modal {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sfadb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 19, 38, .58);
}

.sfadb-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  padding: 28px;
  border-top: 3px solid #176fc9;
  background: #fff;
  box-shadow: 0 24px 65px rgba(3, 20, 42, .28);
}

.form-container .sfadb-modal__close {
  position: absolute;
  top: 13px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef4fa;
  color: #25415f;
  font-size: 25px;
  font-weight: 400;
  line-height: 32px;
}

.form-container .sfadb-modal__close:hover {
  background: #dfebf6;
  color: #176fc9;
}

.sfadb-modal__heading > span {
  color: #176fc9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sfadb-modal__heading h2 {
  margin: 5px 42px 6px 0;
  color: #071a37;
  font-size: 23px;
}

.sfadb-modal__heading p {
  margin: 0;
  color: #6e7f94;
  font-size: 13px;
  line-height: 1.5;
}

.sfadb-modal__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.form-container .sfadb-modal__fields label {
  margin: 0;
  color: #263a53;
  font-size: 12px;
}

.form-container .sfadb-modal__fields input {
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid #cad8e6;
  border-radius: 3px;
  background: #fff;
  color: #0d203b;
  font: inherit;
  outline: 0;
}

.form-container .sfadb-modal__fields input:focus {
  border-color: #176fc9;
  box-shadow: 0 0 0 3px rgba(23, 111, 201, .12);
}

.sfadb-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.form-container .sfadb-modal__button {
  width: auto;
  min-width: 125px;
  padding: 11px 17px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
}

.form-container .sfadb-modal__button.is-secondary {
  border: 1px solid #cbd9e7;
  background: #fff;
  color: #40546c;
}

.form-container .sfadb-modal__button.is-secondary:hover {
  border-color: #9fb8d1;
  background: #f5f9fc;
}

.form-container .sfadb-modal__button.is-primary {
  border: 1px solid #176fc9;
  background: #176fc9;
  color: #fff;
}

.form-container .sfadb-modal__button.is-primary:hover {
  border-color: #105da9;
  background: #105da9;
}

body.sfadb-modal-open {
  overflow: hidden;
}

.sfadb-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media only screen and (max-width: 640px) {
  .sfadb-ecu-card {
    margin-right: -14px;
    margin-left: -14px;
    padding: 18px 14px;
  }

  .ecutable-main {
    max-height: 250px;
    padding-right: 0;
  }

  .eculisttable,
  .eculisttable tbody,
  .eculisttable tr,
  .eculisttable td {
    display: block;
    width: 100%;
  }

  .eculisttable thead {
    display: none;
  }

  .eculisttable tbody tr {
    position: relative;
    margin: 0;
    padding: 14px 12px 14px 46px;
    border: 0;
    border-bottom: 1px solid #dce6f0;
    background: #fff;
  }

  .eculisttable tbody tr.selected-ecu {
    background: #edf6ff;
    box-shadow: inset 3px 0 #176fc9;
  }

  .eculisttable tbody tr:last-child {
    border-bottom: 0;
  }

  .eculisttable td,
  .eculisttable td:first-child,
  .eculisttable td:nth-child(2),
  .eculisttable td:last-child {
    width: 100%;
    padding: 2px 0;
    border: 0;
    background: transparent;
  }

  .eculisttable td:nth-child(2) {
    margin-bottom: 7px;
  }

  .eculisttable td:last-child {
    font-size: 10.5px;
    line-height: 1.45;
    word-break: break-all;
  }

  .eculisttable tbody tr:hover td,
  .eculisttable tbody tr:focus td,
  .eculisttable tbody tr.selected-ecu td {
    border: 0;
    background: transparent;
  }

  .eculisttable tbody tr.selected-ecu td:first-child {
    box-shadow: none;
  }

  .eculisttable td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: #77869a;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .eculisttable .sfadb-ecu-select {
    position: absolute;
    top: 14px;
    right: auto;
    left: 12px;
    width: 22px;
    text-align: left;
  }

  .eculisttable .sfadb-ecu-select label {
    display: block;
    margin: 0;
  }

  .eculisttable .sfadb-ecu-select::before {
    display: none;
  }

  .sfadb-lcs-actions {
    grid-template-columns: 1fr 1fr;
  }

  .sfadb-lcs-actions .sfadb-edit-button {
    grid-column: 1 / -1;
  }

  .sfadb-modal {
    align-items: flex-end;
    padding: 0;
  }

  .sfadb-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 24px 18px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .sfadb-modal__fields {
    grid-template-columns: 1fr;
  }

  .sfadb-modal__actions {
    flex-direction: column-reverse;
  }

  .form-container .sfadb-modal__button {
    width: 100%;
  }
}
