.kt-freight-view {
  --kt-freight-border: #dbe4f0;
  --kt-freight-blue: #1861b8;
  --kt-freight-active: #2678d3;
  --kt-freight-muted: #52647a;
  color: #15263d;
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
}

.kt-freight-view [hidden] { display: none !important; }
.kt-freight-card {
  background: #fff;
  min-width: 0;
  border: 1px solid var(--kt-freight-border);
  border-radius: 7px;
}

.kt-freight-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px 8px;
}

.kt-freight-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.kt-freight-view .kt-freight-filter,
.kt-freight-view .kt-freight-toggle,
.kt-freight-view .kt-freight-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid #4387d1;
  border-radius: 7px;
  background: #fff;
  color: var(--kt-freight-blue);
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.kt-freight-view .kt-freight-filter:hover,
.kt-freight-view .kt-freight-toggle:hover { background: #eff6fd; }
.kt-freight-view .kt-freight-filter[aria-pressed='true'],
.kt-freight-view .kt-freight-primary {
  background: var(--kt-freight-active);
  border-color: var(--kt-freight-active);
  color: #fff;
}
.kt-freight-view .kt-freight-primary:hover { background: #1766bc; }
.kt-freight-view :is(button, a, input, select, [tabindex]):focus-visible {
  outline: 2px solid #145abd;
  outline-offset: 2px;
}

.kt-freight-scroll {
  max-width: 100%;
  min-block-size: clamp(360px, calc(100dvh - 220px), 840px);
  max-block-size: min(840px, max(360px, calc(100dvh - 155px)));
  overflow: auto;
  border-top: 1px solid var(--kt-freight-border);
  border-bottom: 1px solid var(--kt-freight-border);
  scrollbar-color: #a9bdd5 #edf2f7;
}

.kt-freight-view .kt-freight-table {
  width: 100%;
  min-width: 2037px;
  table-layout: fixed;
  border-spacing: 0;
  border-collapse: separate;
  background: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.kt-freight-table :is(th, td) {
  padding: 10px 11px;
  border: 0;
  border-right: 1px solid var(--kt-freight-border);
  border-bottom: 1px solid var(--kt-freight-border);
  vertical-align: middle;
}
.kt-freight-table tr > :last-child { border-right: 0; }
.kt-freight-table tbody tr:last-child > * { border-bottom: 0; }
.kt-freight-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.kt-freight-table thead th {
  height: 49px;
  background: #eaf1fc;
  color: #354b65;
  font-weight: 600;
  white-space: nowrap;
}
.kt-freight-table thead th[scope='colgroup'],
.kt-freight-table thead th[rowspan='2']:not(:first-child) { text-align: center; }
.kt-freight-table .kt-freight-column-head th { white-space: normal; text-align: left; }
.kt-freight-table tbody tr > * { height: 74px; }
.kt-freight-table tbody tr:nth-child(even) { background: #fcfdff; }
.kt-freight-table tbody tr.is-selected { background: #edf6ff; }
.kt-freight-table .kt-freight-select-cell { padding-inline: 0; text-align: center; }
.kt-freight-check {
  width: 14px;
  height: 14px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--kt-freight-active);
  cursor: pointer;
}
.kt-freight-name { min-width: 136px; font-weight: 400; }
.kt-freight-name strong { display: block; color: #204d9a; font-size: 14px; font-weight: 700; }
.kt-freight-name span { display: block; margin-top: 3px; color: #334761; }
.kt-freight-method { text-align: center; }
.kt-freight-method > :last-child { display: block; margin-top: 4px; }
.kt-freight-method-pill { display: inline-block; border-radius: 5px; padding: 3px 8px; background: #e7f5ed; color: #176344; font-weight: 700; }
.kt-freight-method-pill.is-air { background: #e7f0fd; color: #164f9b; }
.kt-freight-number { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.kt-freight-table .kt-freight-speed { white-space: normal; padding-inline: 7px; }
.kt-freight-speed > small { font-size: 11px; font-weight: 400; }
.kt-freight-formula {
  border-radius: 5px;
  padding: 6px 9px;
  background: #f3f6fa;
  color: #334761;
}
.kt-freight-formula > span { display: block; }
.kt-freight-rule { white-space: nowrap; }
.kt-freight-volume { white-space: normal; overflow-wrap: anywhere; }
.kt-freight-table small { display: block; margin-top: 3px; color: var(--kt-freight-muted); font-size: 12px; }
.kt-freight-limit { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kt-freight-muted, .kt-freight-view .kt-freight-number.kt-freight-muted { color: var(--kt-freight-muted); font-weight: 400; }

.kt-freight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-height: 54px;
  padding: 10px 14px;
  color: var(--kt-freight-muted);
  font-size: 12px;
}
.kt-freight-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 13px; }
.kt-freight-refs a { color: var(--kt-freight-blue); text-decoration: underline; text-underline-offset: 2px; }
.kt-freight-count { white-space: nowrap; }
.kt-freight-navigation,
.kt-freight-selection,
.kt-freight-page-numbers,
.kt-freight-jump,
.kt-freight-jump label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.kt-freight-navigation { margin-left: auto; gap: 8px; }
.kt-freight-selection { margin-inline-end: 4px; }
.kt-freight-selection-count { white-space: nowrap; font-weight: 650; }
.kt-freight-view .kt-freight-list-action,
.kt-freight-view .kt-freight-page-control,
.kt-freight-view .kt-freight-page-size,
.kt-freight-view .kt-freight-page-jump {
  min-height: 29px;
  min-width: 28px;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid #d9e2ee;
  border-radius: 4px;
  background: #fff;
  color: #37506d;
  font: inherit;
}
.kt-freight-view .kt-freight-page-size { padding: 3px 6px; }
.kt-freight-view .kt-freight-list-action,
.kt-freight-view .kt-freight-page-control { padding: 2px 7px; cursor: pointer; }
.kt-freight-view .kt-freight-page-control[aria-current],
.kt-freight-view .kt-freight-list-action[aria-pressed='true'] { color: #fff; background: var(--kt-freight-active); border-color: var(--kt-freight-active); }
.kt-freight-view :is(.kt-freight-page-control, .kt-freight-page-jump):disabled { cursor: default; color: #858fa0; background: #f1f4f9; }
.kt-freight-view .kt-freight-page-jump { width: 43px; padding: 2px 4px; text-align: center; }
.kt-freight-view .kt-freight-jump label { margin: 0; font-size: inherit; }

.kt-freight-quote { margin-top: 14px; padding: 16px; }
.kt-freight-quote h3 { margin: 0 0 13px; font-size: 16px; }
.kt-freight-fields { display: grid; gap: 13px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.kt-freight-view .kt-freight-field { min-width: 0; display: grid; gap: 6px; margin: 0; color: #334761; font-size: 13px; }
.kt-freight-field :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #abbcd0;
  border-radius: 6px;
  padding: 7px 9px;
  color: #182c46;
  background: #fff;
  font: inherit;
}
.kt-freight-field input::placeholder { color: #62748b; }
.kt-freight-view [aria-invalid='true'] { border-color: #b91c1c; background: #fff7f7; }
.kt-freight-quote-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-top: 13px; font-size: 12px; }
.kt-freight-result { display: grid; gap: 4px; margin-top: 13px; padding: 12px; border-radius: 6px; border: 1px solid #bfdbfa; background: #f1f7ff; }
.kt-freight-result strong { font-size: 17px; color: #194f93; }
.kt-freight-result small { color: var(--kt-freight-muted); }
.kt-freight-result.is-error { color: #991b1b; border-color: #f4b3b3; background: #fff7f7; }

.kt-freight-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 600px) {
  .kt-freight-toolbar, .kt-freight-footer, .kt-freight-quote { padding-left: 10px; padding-right: 10px; }
  .kt-freight-view .kt-freight-filter, .kt-freight-view .kt-freight-toggle { min-height: 36px; }
  .kt-freight-filters { gap: 5px; }
  .kt-freight-refs { gap: 3px 8px; }
  .kt-freight-scroll { min-block-size: 0; max-block-size: min(540px, 70dvh); }
  .kt-freight-navigation { margin-left: 0; }
}
