/* <CustomButton /> */
@import './czi-vars.css';

.czi-custom-buttons {
  white-space: nowrap;
  margin: 0 8px;
}

.czi-custom-button {
  background-clip: padding-box;
  background-color: #fff;
  border-radius: 5px;
  border: var(--czi-border-grey);
  box-sizing: border-box;
  color: var(--czi-button-text-color);
  cursor: pointer;
  display: inline-block;
  font-family: var(--czi-font-family);
  font-size: var(--czi-font-size);
  font-weight: normal;
  line-height: 1.2em;
  overflow: hidden;
  padding: 6px 12px;
  position: relative;
  text-overflow: ellipsis;
  user-select: none;
  vertical-align: middle;
  white-space: nowrap;
}

.czi-custom-button.use-icon {
  border-color: transparent;
  padding: 0;
}

.czi-custom-button:focus,
.czi-custom-button:hover {
  background-color: #f0f0f0;
  border-color: #555;
  outline: none;
}

.czi-custom-button.active {
  /*
   * Use text-stroke to strengthen teh text, do not use "bold" because it will
   * cause layout reflow.
   * Firefox & Edge specifically only support the -webkit-text-stroke property.
   * https://caniuse.com/#feat=text-stroke
   */
  -webkit-text-stroke-color: #000;
  -webkit-text-stroke-width: 0.5px;

  /* text-shadow: 0px 0px 1px #000; */
  border-color: #666;
  color: #000;
}

.czi-custom-button.pressed {
  background-color: #e0e0e0;
}

.czi-custom-button.disabled,
.czi-custom-button.disabled:hover {
  -webkit-text-stroke-width: 0;
  background: #fff;
  border-color: #ccc;
  color: #dedede;
  cursor: unset;
  pointer-events: none;
}

.czi-custom-buttons .czi-custom-button {
  border-radius: 0;
  margin-left: 0;
}

.czi-custom-buttons > .czi-custom-button:first-child {
  border-top-left-radius: var(--czi-button-radius);
  border-bottom-left-radius: var(--czi-button-radius);
}

.czi-custom-buttons > .czi-custom-button:last-child {
  border-radius: 0;
  border-top-right-radius: var(--czi-button-radius);
  border-bottom-right-radius: var(--czi-button-radius);
}

.czi-custom-buttons > .czi-custom-button:only-child {
  border-radius: var(--czi-button-radius);
}
