@url searchImage searchImage;
@url clearImage searchClearImage;
@if mgwt.css pretty {
  @external mgwt-SearchBox, mgwt-SearchBox-round;
  @external mgwt-SearchBox-input, mgwt-SearchBox-clear;
  @external mgwt-SearchBox-clear-active;
  @external mgwt-SearchBox-icon;
}

::-webkit-search-cancel-button { -webkit-appearance: none; }

.mgwt-SearchBox {
  height: 44px;
  position: relative;
  background-size: 100% 44px;
  background-repeat: repeat;
  background-position: 0px 0px;
  min-width: 200px;
}

.mgwt-SearchBox-input {
  border: 0;
  font-size: 13px;
  padding: 0;
  position: absolute;
  display: block;
  top: 1px;
  left: 25px;
  right: 60px;
  bottom: 1px;
  outline: none;
  width: literal("calc(100% - 47px)");
}

@if user.agent safari {
  .mgwt-SearchBox-input {
    width: literal("-webkit-calc(100% - 47px)");
  }
}

@if user.agent gecko1_8 {
  .mgwt-SearchBox-input {
    width: literal("-moz-calc(100% - 47px);");
  }
}

@if user.agent safari {
  .mgwt-SearchBox-input {
    -webkit-appearance: none;
    -webkit-user-select: text;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
}

@if user.agent gecko1_8 {
  .mgwt-SearchBox-input {
    top: 5px;
    -moz-appearance: none;
    -moz-user-select: text;
    -moz-tap-highlight-color: rgba(0, 0, 0, 0);
  }
}

@if user.agent ie9 ie10 {
  .mgwt-SearchBox-input {
    top: 5px;
  }
}

.mgwt-SearchBox-clear-active {
}

.mgwt-SearchBox-round {
  height: 24px;
  display: block;
  position: relative;
  top: 7px;
  margin-right: 10px;
  margin-left: 10px;
  font-size: 16px;
  border: 1px solid #9daca9;
  background-color: #fff;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.23);
  color: #454545;
  border-radius: 16px;
  background-color: white;
}

@if user.agent safari {
  .mgwt-SearchBox-icon {
    -webkit-mask-image: searchImage;
    -webkit-mask-repeat: no-repeat;
  }
}

.mgwt-SearchBox-icon {
    position: relative;
    top: 7px;
    left: 8px;
    height: 16px;
    width: 16px;
    background-color: #78787E;
  }

@if mgwt.density high {
  .mgwt-SearchBox-icon {
    -webkit-mask-size: 17px 17px;
  }
}

@if mgwt.density xhigh {
  .mgwt-SearchBox-icon {
    -webkit-mask-size: 12px 12px;
  }
}

@if user.agent safari {
  .mgwt-SearchBox-clear {
    -webkit-mask-image: clearImage;
    -webkit-mask-position: center center;
    -webkit-mask-repeat: no-repeat;
  }	
}

.mgwt-SearchBox-clear {
  position: absolute;
  top: -2px;
  right: 0px;
  height: 30px;
  width: 30px;
  background-color: #78787E;
}

@if mgwt.density high {
  .mgwt-SearchBox-clear {
    -webkit-mask-size: 19px 19px;
  }
}

@if mgwt.density xhigh {
  .mgwt-SearchBox-clear {
    -webkit-mask-size: 14px 14px;
  }
}
