﻿.tsl-root {
  --bg1: #336699;
  --bg2: #133c5a;
  --border: #cfcfcf;
  --text: #0f1b2d;
  --control-h: 44px;
  --radius: 6px;
  width: 100%;
  max-width: 610px;
  margin: 6px 0 0;
  padding: 6px 8px 8px;
  border-radius: 8px;
  background: linear-gradient(to bottom, var(--bg1), var(--bg2));
  box-sizing: border-box;
  position: relative;
  z-index: 40;
  overflow: visible !important;
}

.tsl-root * {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

.tsl-row {
  display: grid;
  gap: 8px;
  align-items: center;
  overflow: visible;
}

.tsl-row-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.tsl-search-wrap {
  position: relative;
  z-index: 1200;
  overflow: visible !important;
}

.tsl-row-bottom {
  margin-top: 6px;
  grid-template-columns: 1fr 1fr;
}

.tsl-suggest {
  position: absolute;
  top: calc(var(--control-h) + 6px);
  left: 0;
  right: 0;
  z-index: 9999;
  border: 1px solid #cfd8e5;
  border-radius: var(--radius);
  background: #fff;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}

.tsl-row-bottom {
  position: relative;
  z-index: 10;
}

.tsl-suggest.show {
  display: block;
}

.tsl-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.tsl-suggest-item:last-child {
  border-bottom: 0;
}

.tsl-suggest-item.active,
.tsl-suggest-item:hover {
  background: #eaf2ff;
}

.tsl-input,
.tsl-select,
.tsl-btn {
  height: var(--control-h) !important;
  min-height: var(--control-h) !important;
  max-height: var(--control-h) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  background: #fff;
  color: var(--text);
}

.tsl-input,
.tsl-select {
  width: 100%;
  padding: 0 10px;
}

.tsl-input {
  flex: 1 1 0% !important;
  width: 0 !important;
  min-width: 0;
  margin: 0 !important;
  max-width: none !important;
  line-height: var(--control-h) !important;
  padding: 0 12px !important;
  appearance: none;
  -webkit-appearance: none;
}

.tsl-actions {
  display: flex;
  flex: 0 0 auto !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tsl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  padding: 0 12px;
  font-weight: 600;
  margin: 0 !important;
  line-height: 1 !important;
}

.tsl-btn-search {
  flex: 0 0 72px !important;
  width: 72px !important;
  min-width: 72px !important;
}

.tsl-btn-gps {
  flex: 0 0 var(--control-h);
  width: var(--control-h);
  min-width: var(--control-h);
  height: var(--control-h);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  vertical-align: middle;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tsl-btn-gps::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #555;
  border-radius: 50%;
}

.tsl-btn-gps span {
  position: absolute;
  background: #555;
}

.tsl-btn-gps .top {
  width: 2px;
  height: 12px;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.tsl-btn-gps .bottom {
  width: 2px;
  height: 12px;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.tsl-btn-gps .left {
  width: 12px;
  height: 2px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 2px;
}

.tsl-btn-gps .right {
  width: 12px;
  height: 2px;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 2px;
}

.tsl-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.tsl-segmented button {
  height: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  background: #eef2f7;
  font-weight: 700;
  color: #263241;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.tsl-root .tsl-segmented button::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  flex: 0 0 18px;
  opacity: 1 !important;
}

.tsl-root .tsl-segmented .tsl-mode-fuel::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23263241' d='M6 3h9a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1.5 2v4h6V5h-6Zm10.7 2.6.9-.9 2.9 2.9v5.2a2.5 2.5 0 0 1-5 0V12h1.8v2.8a.7.7 0 1 0 1.4 0v-4.4l-2-2Z'/%3E%3C/svg%3E");
}

.tsl-root .tsl-segmented .tsl-mode-charging::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23263241' d='M13 2 5 13h5l-1 9 8-11h-5l1-9Z'/%3E%3C/svg%3E");
}

.tsl-root .tsl-segmented .tsl-mode-fuel.active::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M6 3h9a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1.5 2v4h6V5h-6Zm10.7 2.6.9-.9 2.9 2.9v5.2a2.5 2.5 0 0 1-5 0V12h1.8v2.8a.7.7 0 1 0 1.4 0v-4.4l-2-2Z'/%3E%3C/svg%3E");
}

.tsl-root .tsl-segmented .tsl-mode-charging.active::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M13 2 5 13h5l-1 9 8-11h-5l1-9Z'/%3E%3C/svg%3E");
}

.tsl-segmented button + button {
  border-left: 1px solid var(--border);
}

.tsl-segmented button.active {
  background: #1e6de0 !important;
  color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}

.tsl-segmented button:hover,
.tsl-segmented button:focus,
.tsl-segmented button:focus-visible {
  background: #e9eff7 !important;
  color: #263241 !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none;
}

.tsl-segmented button.active:hover,
.tsl-segmented button.active:focus,
.tsl-segmented button.active:focus-visible {
  background: #1e6de0 !important;
  color: #fff !important;
}

@media (max-width: 520px) {
  .tsl-row-top {
    gap: 6px;
  }

  .tsl-actions {
    gap: 6px;
  }

  .tsl-btn-search {
    flex: 0 0 66px !important;
    width: 66px !important;
    min-width: 66px !important;
    padding: 0 8px;
    margin-left: 1px !important;
  }

  .tsl-btn-gps {
    flex-basis: 40px;
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .tsl-row-bottom {
    grid-template-columns: 1fr;
  }

  .tsl-segmented button.active {
    background: #1e6de0 !important;
    color: #fff !important;
  }
}

