.bdtt-city-selector {
  position: relative;
}

.bdtt-city-selector .location__btn {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.bdtt-city-selector .location__city {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bdtt-city-confirm[hidden],
.bdtt-city-overlay[hidden],
.bdtt-city-results[hidden] {
  display: none !important;
}

.bdtt-city-confirm {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, .22);
  color: #222;
  left: 0;
  min-width: 300px;
  padding: 18px;
  position: absolute;
  top: calc(100% + 12px);
  z-index: 10020;
}

.bdtt-city-confirm::before {
  background: #fff;
  border-left: 1px solid #e5e5e5;
  border-top: 1px solid #e5e5e5;
  content: "";
  height: 10px;
  left: 22px;
  position: absolute;
  top: -6px;
  transform: rotate(45deg);
  width: 10px;
}

.bdtt-city-confirm__text {
  color: #222;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.bdtt-city-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bdtt-city-action {
  background: #f2f2f2;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #222;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 13px;
}

.bdtt-city-action:hover,
.bdtt-city-action:focus-visible {
  background: #e8e8e8;
}

.bdtt-city-action--primary {
  background: #16a6bc;
  border-color: #16a6bc;
  color: #fff;
}

.bdtt-city-action--primary:hover,
.bdtt-city-action--primary:focus-visible {
  background: #108da0;
}

.bdtt-city-overlay {
  align-items: center;
  background: rgba(0, 0, 0, .56);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100050;
}

.bdtt-city-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .3);
  color: #222;
  max-height: calc(100vh - 40px);
  max-width: 760px;
  overflow: auto;
  padding: 28px;
  position: relative;
  width: 100%;
}

.bdtt-city-modal__close {
  align-items: center;
  background: transparent;
  border: 0;
  color: #555;
  cursor: pointer;
  display: flex;
  font: 300 32px/1 Arial, sans-serif;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 10px;
  width: 42px;
}

.bdtt-city-modal__title {
  color: #222;
  font-size: 25px;
  font-weight: 600;
  margin: 0 44px 22px 0;
}

.bdtt-city-search {
  display: block;
  position: relative;
}

.bdtt-city-search__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}

.bdtt-city-search__input {
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  box-sizing: border-box;
  color: #222;
  font: inherit;
  font-size: 16px;
  height: 48px;
  padding: 0 14px;
  width: 100%;
}

.bdtt-city-search__input:focus {
  border-color: #16a6bc;
  box-shadow: 0 0 0 3px rgba(22, 166, 188, .15);
  outline: 0;
}

.bdtt-city-results {
  border: 1px solid #dedede;
  border-radius: 6px;
  margin-top: 6px;
  max-height: 260px;
  overflow: auto;
}

.bdtt-city-result {
  background: #fff;
  border: 0;
  border-bottom: 1px solid #eee;
  color: #222;
  cursor: pointer;
  display: block;
  font: inherit;
  padding: 11px 14px;
  text-align: left;
  width: 100%;
}

.bdtt-city-result:last-child {
  border-bottom: 0;
}

.bdtt-city-result:hover,
.bdtt-city-result:focus-visible {
  background: #f2fafb;
}

.bdtt-city-result__region {
  color: #777;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.bdtt-city-status {
  color: #777;
  font-size: 13px;
  min-height: 20px;
  margin: 6px 0 4px;
}

.bdtt-city-popular {
  display: grid;
  gap: 2px 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.bdtt-city-popular button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #222;
  cursor: pointer;
  font: inherit;
  padding: 9px 10px;
  text-align: left;
}

.bdtt-city-popular button:hover,
.bdtt-city-popular button:focus-visible {
  background: #f2fafb;
  color: #108da0;
}

html.bdtt-city-modal-open,
html.bdtt-city-modal-open body {
  overflow: hidden;
}

@media (max-width: 767px) {
  .bdtt-city-confirm {
    left: 14px;
    min-width: 0;
    position: fixed;
    right: 14px;
    top: 68px;
  }

  .bdtt-city-confirm::before {
    display: none;
  }

  .bdtt-city-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .bdtt-city-modal {
    border-radius: 12px 12px 0 0;
    max-height: 88vh;
    max-width: none;
    padding: 24px 18px;
  }

  .bdtt-city-modal__title {
    font-size: 22px;
  }

  .bdtt-city-popular {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
