.dtrc {
  border: 1px solid #d7dde5;
  padding: 1.25rem;
  border-radius: .75rem;
  max-width: 780px;
  margin: 0 auto;
  background: #f5f7fa;
  box-sizing: border-box;
  color: #111827;
}

.dtrc,
.dtrc * {
  box-sizing: border-box;
}

.dtrc__form {
  margin: 0;
}

.dtrc__row {
  margin: 0 0 1rem;
}

.dtrc__row label,
.dtrc__stops-label {
  display: block;
  margin: 0 0 .45rem;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  text-align: left;
  color: #111827;
}

.dtrc input[type=text],
.dtrc select {
  width: 100%;
  min-height: 48px;
  padding: .75rem .9rem;
  border: 1px solid #c4ccd6;
  border-radius: .55rem;
  background: #ffffff;
  color: #111827;
  font: inherit;
  line-height: 1.4;
}

.dtrc input[type=text]::placeholder {
  color: #5f6b7a;
  opacity: 1;
}

.dtrc input[type=text]:focus,
.dtrc select:focus,
.dtrc__addstop:focus,
.dtrc__calc:focus,
.dtrc__mode:focus,
.dtrc__stops-list .dtrc__stop button:focus {
  outline: 2px solid #0f62fe;
  outline-offset: 2px;
}

.dtrc__stops {
  margin: 0 0 1rem;
}

.dtrc__stops-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.dtrc__stops-list .dtrc__stop {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.dtrc__stops-list .dtrc__stop input {
  flex: 1 1 auto;
  min-width: 0;
}

.dtrc__stops-list .dtrc__stop button {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 .8rem;
  border: 0;
  border-radius: .5rem;
  background: #b91c1c;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.dtrc__actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0 0 1rem;
}

.dtrc__actions--primary {
  margin-bottom: 0;
}

.dtrc__addstop,
.dtrc__calc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .7rem 1rem;
  border: 0;
  border-radius: .55rem;
  background: #111827;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
}

.dtrc__calc[disabled] {
  opacity: .72;
  cursor: wait;
}

.dtrc__toggle {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: flex-start;
  margin: 1rem 0 0;
}

.dtrc__mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 96px;
  padding: .55rem .9rem;
  border: 1px solid #bcc6d3;
  border-radius: .55rem;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.dtrc__mode[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.dtrc__mode.is-active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.dtrc__map {
  height: 360px;
  margin: 1rem 0 0;
  border: 1px solid #d7dde5;
  border-radius: .55rem;
  overflow: hidden;
}

.dtrc__result {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #dde3ea;
  border-radius: .55rem;
  background: #f9fafb;
}

.dtrc__summary {
  margin: 0 0 .3rem;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1f2937;
}

.dtrc__summary-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .55rem;
  margin-left: .5rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: .86rem;
  font-weight: 700;
  vertical-align: middle;
}

.dtrc__summary-badge::before {
  content: "✓";
  font-weight: 800;
}

.dtrc__price {
  font-size: 2.4rem;
  line-height: 1.1;
  font-weight: 800;
  color: #111827;
}

.dtrc__price.is-cheapest {
  color: #166534;
}

.dtrc__meta {
  margin-top: .35rem;
  color: #374151;
  font-size: .98rem;
}

.dtrc__compare {
  margin-top: .85rem;
  display: grid;
  gap: .55rem;
  font-size: .95rem;
  color: #374151;
}

.dtrc__compare-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .65rem;
  padding: .65rem .75rem;
  border: 1px solid #dde3ea;
  border-radius: .5rem;
  background: #ffffff;
}

.dtrc__compare-row.is-cheapest {
  border-color: #166534;
  background: #f0fdf4;
}

.dtrc__compare-route {
  font-weight: 700;
  color: #111827;
}

.dtrc__compare-price {
  font-weight: 800;
  color: #111827;
}

.dtrc__compare-row.is-cheapest .dtrc__compare-price {
  color: #166534;
}

.dtrc__compare-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: #166534;
  font-weight: 700;
}

.dtrc__compare-badge::before {
  content: "✓";
  font-weight: 800;
}

.dtrc__placeholder {
  margin-top: .8rem;
  color: #4b5563;
  font-size: .95rem;
}

@media (max-width: 640px) {
  .dtrc {
    padding: 1rem;
  }

  .dtrc__stops-list .dtrc__stop {
    flex-wrap: wrap;
  }

  .dtrc__stops-list .dtrc__stop button {
    width: 100%;
    justify-content: center;
  }

  .dtrc__price {
    font-size: 2rem;
  }

  .dtrc__compare-row {
    align-items: flex-start;
  }
}


.dtrc__notice {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border: 1px solid #f5c2c7;
  border-radius: .55rem;
  background: #fff5f5;
  color: #842029;
  font-weight: 600;
}

.dtrc__compare-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: .84rem;
  font-weight: 700;
}
