.web-flag-field {
  position: relative;
  width: var(--web-flag-closed-width);
  height: var(--web-flag-open-height);
  min-width: var(--web-flag-closed-width);
  font-size: var(--web-flag-font-size);
  font-weight: var(--web-flag-font-weight);
  color: var(--web-flag-text-color);
  transition: width 120ms ease, min-width 120ms ease;
}

.web-flag-field:focus {
  outline: none;
}

.web-flag-field.is-focused,
.web-flag-field:focus-within,
.web-flag-field.is-open {
  width: var(--web-flag-open-width);
  min-width: var(--web-flag-open-width);
}

.web-flag-field__button {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  border: 0;
  background: var(--web-flag-bg);
  color: var(--web-flag-text-color);
  font: inherit;
  box-sizing: border-box;
  padding: 0;
  cursor: pointer;
}

.web-flag-field.is-focused .web-flag-field__button,
.web-flag-field:focus-within .web-flag-field__button,
.web-flag-field.is-open .web-flag-field__button {
  grid-template-columns: minmax(0, 1fr) 8px;
  gap: 4px;
  border: var(--web-flag-border-width) solid var(--web-flag-focus-border-color);
  background: var(--web-flag-focus-bg);
  padding: 0 4px;
}

.web-flag-field__button::after {
  content: "";
  display: none;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--web-flag-arrow-color);
}

.web-flag-field.is-focused .web-flag-field__button::after,
.web-flag-field:focus-within .web-flag-field__button::after,
.web-flag-field.is-open .web-flag-field__button::after {
  display: block;
}

.web-flag-field__button:focus {
  outline: none;
}

.web-flag-field__list {
  position: absolute;
  z-index: 30;
  right: 0;
  top: calc(100% + 2px);
  width: var(--web-flag-dropdown-width);
  border: var(--web-flag-border-width) solid var(--web-flag-border-color);
  background: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 53, 128, 0.12);
}

.web-flag-field__option {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 0;
  background: #FFFFFF;
  color: var(--web-flag-text-color);
  font: inherit;
  text-align: left;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
}

.web-flag-field__option:hover,
.web-flag-field__option:focus,
.web-flag-field__option.is-selected {
  background: var(--web-flag-option-hover-bg);
  color: var(--web-flag-option-selected-text);
  outline: none;
}

.web-flag-field__flag {
  width: var(--web-flag-width);
  height: var(--web-flag-height);
  display: block;
  object-fit: contain;
  justify-self: center;
}

.web-flag-field--circle .web-flag-field__flag {
  border-radius: 999px;
}

.web-flag-field__option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
