/* City keyword management controls. Keep this page easier to scan and operate. */
.city-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #dce6e9;
  border-radius: 7px;
  color: #71808e;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.city-keyword-chip.is-checked {
  border-color: #8bd2c9;
  color: #177f78;
  background: #effaf8;
  box-shadow: 0 1px 2px #0b9a8f12;
}

.city-keyword-chip input,
.city-ref-keywords input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  accent-color: #0b9a8f;
  cursor: pointer;
}

.city-keyword-chip input:focus-visible,
.city-ref-keywords input[type="checkbox"]:focus-visible {
  outline: 3px solid #0b9a8f33;
  outline-offset: 2px;
}

.city-keyword-chip em {
  padding: 3px 6px;
  border-radius: 4px;
  color: #9a7a49;
  background: #fff6e9;
  font-size: 9px;
  font-style: normal;
}

.city-ref-keywords .ref-data-table th:first-child,
.city-ref-keywords .ref-data-table td:first-child {
  width: 54px;
  text-align: center;
}

.city-ref-keywords .ref-data-table td:first-child {
  padding-right: 14px;
  padding-left: 14px;
}

.city-ref-keywords .ref-check-field {
  display: flex;
  align-items: center;
  gap: 9px;
}

.city-ref-keywords .expand-list {
  display: grid;
  gap: 6px;
  padding-right: 2px;
}

.city-ref-keywords .expand-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  margin: 0;
  border: 1px solid #e2e9ed;
  background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.city-ref-keywords .expand-item.checked {
  border-color: #9bd8d0;
  background: #effaf8;
  box-shadow: 0 1px 2px #0b9a8f12;
}

.city-ref-keywords .expand-item:hover {
  border-color: #73c7bd;
}

.city-ref-keywords .expand-item input[type="checkbox"] {
  justify-self: center;
}

.city-ref-keywords .expand-word {
  line-height: 1.55;
}

.city-ref-keywords .expand-item .ref-button-small {
  min-height: 28px;
  padding: 0 9px;
}

.city-ref-keywords .city-ref-ai-result {
  padding: 16px;
}

.city-ref-keywords .city-ref-ai-result .result-header {
  align-items: center;
  margin-bottom: 13px;
}

.city-ref-keywords .city-ref-ai-result .result-header .action-btns {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.city-keyword-result .city-keyword-chip-grid {
  gap: 9px;
  padding: 2px 16px 18px;
}

.city-keyword-result .city-keyword-chip input {
  flex: 0 0 18px;
}

.city-keyword-result .city-keyword-chip span {
  line-height: 1.45;
}

@media (max-width: 700px) {
  .city-ref-keywords .expand-item {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }

  .city-ref-keywords .expand-item .ct-tag {
    grid-column: 2;
    justify-self: start;
  }

  .city-ref-keywords .expand-item .ref-button-small {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}
