/* Wordstat region combobox. Matches .mk-tool-text__input / __select. */

.mk-region-picker {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.mk-region-picker.is-open {
  z-index: 30;
}

.mk-region-picker__input {
  box-sizing: border-box;
  min-height: 2.85rem;
}

.mk-region-picker__input:focus {
  border-color: rgba(34, 51, 130, 0.45);
  outline: 2px solid rgba(34, 51, 130, 0.28);
  outline-offset: 1px;
}

.mk-region-picker__list {
  position: absolute;
  z-index: 31;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  max-height: 16rem;
  max-height: min(16rem, 50vh);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(28, 28, 36, 0.04),
    0 12px 32px rgba(34, 51, 130, 0.12);
}

.mk-region-picker__list[hidden] {
  display: none !important;
}

.mk-region-picker__option {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}

.mk-region-picker__option.is-active {
  background: rgba(34, 51, 130, 0.08);
}

.mk-region-picker__name {
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mk-region-picker__path {
  font-size: 0.8rem;
  line-height: 1.3;
  color: #667085;
  overflow-wrap: anywhere;
}

.mk-region-picker__status {
  margin: 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #667085;
}

@media (max-width: 640px) {
  .mk-region-picker__input {
    font-size: 16px;
  }
}

@media (hover: hover) {
  .mk-region-picker__option:hover {
    background: rgba(34, 51, 130, 0.06);
  }
}
