@import "../../../styles/common.less";

.cyber-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  border: none;
  box-sizing: border-box;
  height: 32px;
  border: 1px solid #d7d7d7;
  line-height: 32px;
  // outline: none;
  font-size: 13px;
  font-weight: 400;
  user-select: none;
  white-space: nowrap;
  line-height: 30px;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
 

}
.cyber-button.size-large {
  height: 40px;
}
.cyber-button.size-small {
  height: 28px;
}
.cyber-button.size-small > button {
  padding: 0 14px;
}
.cyber-button > button {
  background: none;
  border: none;
  width: 100%;
  height: 100%;
  padding: 0 21px;
  border:solid 1px transparent;
  box-sizing: border-box;
  color: inherit;
  cursor: pointer;
  border-radius: 4px;
  &:focus{
    outline : 1px solid #1890ff ;
  }
  vertical-align: middle;
}
.cyber-button.icon-button > button {
  padding: 0 5px;
}
.cyber-button-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  line-height: normal;
}
.cyber-button-wrapper .cyber-button-prefix {
  left: -8px;
}
.cyber-button-wrapper .cyber-button-prefix,
.cyber-button-wrapper .cyber-button-suffix {
  position: relative;
  height: 30px;
  line-height: 34px;
}
.cyber-button-wrapper .cyber-button-suffix {
  left: 8px;
}
.cyber-button.theme-danger {
  color: #ea001e;
  background: #ffffff;
}
.cyber-button.theme-danger:hover {
  color: #ba051f;
  background: #fafaf9;
}
.cyber-button.theme-danger:active:not(.disabled) {
  color: #ba051f;
  background-color: #fafaf9;
}

.cyber-button.theme-default {
  color: #1890ff;
  background: #ffffff;
}
.cyber-button.theme-default:hover {
  color: #0079e9;
  background: #fafaf9;
}
.cyber-button.theme-default:active:not(.disabled) {
  color: #0079e9;
  background-color: #fafaf9;
}

.cyber-button.theme-normal {
  color: #666666;
  background-color: #fff;
}
.cyber-button.theme-normal:hover {
  color: #1890ff;
  background-color: #fafaf9;
}

.cyber-button.theme-normal:active:not(.disabled) {
  color: #1890ff;
  background-color: #fafaf9;
}

.cyber-button.theme-primary {
  color: #ffffff;
  background-color: #1890ff;
  border: solid 1px transparent;
}
.cyber-button.theme-primary:hover {
  color: #ffffff;
  background-color: #0079e9;
}
.cyber-button.theme-primary:active:not(.disabled) {
  background-color: #0377e3;
  border-color: #0079e9;
}
.cyber-button.theme-primary.disabled,
.cyber-button.theme-success.disabled,
.cyber-button.theme-error.disabled,
.cyber-button.theme-warning.disabled {
  background-color: #c9c7c5 !important;
  border-color: #c9c7c5 !important;
}

.cyber-button.theme-danger.disabled,
.cyber-button.theme-default.disabled,
.cyber-button.theme-normal.disabled,
.cyber-button.theme-text.disabled {
  color: #d7d7d7;
}

.cyber-button.theme-text.disabled {
  background-color: none !important;
  color: #c9c7c5 !important;
}

.cyber-button.icon-button {
  padding: 0 8px;
}

.cyber-button + .cyber-button {
  margin-left: 8px;
}
.cyber-button + .cyber-button-group {
  margin-left: 8px;
}
.cyber-button-group + .cyber-button {
  margin-left: 8px;
}
.cyber-button-group + .cyber-button-group {
  margin-left: 8px;
}

.cyber-button {
  font-weight: 500;
}

.cyber-button.theme-text {
  background-color: transparent;
  border: none;
  color: #1890ff;
}

.cyber-button.theme-success {
  background-color: #00b32a;
  border-color: #00b32a;
  color: white;
}
.cyber-button.theme-success:hover {
  background-color: #12c83a;
  border-color: #12c83a;
}
.cyber-button.theme-warning {
  background-color: #ffab00;
  border-color: #ffab00;
  color: white;
}
.cyber-button.theme-warning:hover {
  background-color: #ffba02;
  border-color: #ffba02;
}
.cyber-button.theme-error {
  background-color: #de360c;
  border-color: #de360c;
  color: white;
}
.cyber-button.theme-error:hover {
  background-color: #f64119;
  border-color: #f64119;
}
.cyber-button.theme-text:hover {
  color: #0079e9;
}
.cyber-button.disabled {
  pointer-events: none;
}
.cyber-button-disable-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: not-allowed;
  left: 0;
  top: 0;
  padding: 1px;
  pointer-events: initial;
}

.cyber-button .loading-icon {
  animation: fadenum 0.5s ease 0s infinite;
}
@keyframes fadenum {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
