:root {
  --default-button-border-radius: 6px;
}

.Button {
  display: inline-block;
  box-sizing: border-box;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid color-mod(var(--color-border) blackness(5%));
  color: var(--color-text-dark);
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  font-family: var(--default-font-family), sans-serif;
  border-radius: var(--default-button-border-radius);
}

.dark .Button {
  border: 1px solid color-mod(var(--color-primary-dark) blackness(5%));
  background: var(--color-bg-card-dark);
  color: var(--color-primary-dark);
}

.Button:hover {
  color: var(--color-brand);
  border-color: color-mod(var(--color-border) blackness(12%));
  background: var(--color-bg-light);
  transition: all 200ms linear;
  transition-property: color, border-color, background-color;
}

.dark .Button:hover {
  color: var(--color-primary-dark);
  border: 1px solid color-mod(var(--color-primary-dark) blackness(12%));
  background: var(--color-bg-dark);
}

.Button:focus {
  outline: 2px solid var(--color-focus);
}

.Button:focus:not(:focus-visible) {
  outline: none;
}

@media screen and (--breakpoint-min-lg) {
  .Button {
    padding: 0.75rem 1rem;
  }
}

.Button--small {
  padding: 0.45rem 1rem;
}

.Button--medium {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.Button--large {
  padding: 0.8rem 1.25rem;
  font-size: 1rem;
}

.Button-normal {
  font-weight: normal;
}

.Button--round {
  border-radius: 99px;
}

.Button--primary {
  color: var(--color-text-white);
  background: var(--color-brand);
  border: 1px solid var(--color-brand);
}

.dark .Button--primary {
  color: var(--color-text-white);
  background: var(--color-primary-dark);
}

.Button--primary:hover {
  color: var(--color-text-white);
  border-color: var(--color-brand);
  background-color: color-mod(var(--color-brand) alpha(-12%));
}

.dark .Button--primary:hover {
  color: var(--color-text-white);
  background-color: color-mod(var(--color-primary-dark) alpha(-12%));
}

.Button--warning {
  color: var(--color-text-white);
  background: var(--color-error);
  border: 1px solid var(--color-error);
}

.Button--warning:hover {
  color: var(--color-text-white);
  border-color: var(--color-error);
  background-color: var(--color-error);
}

.Button--cancel {
  border-radius: 99px;
}

.Button--white {
  background-color: white;
  color: var(--color-text-dark);
  border-color: var(--color-border);
}

.Button--borderless {
  border-color: transparent;
  background: transparent;
  color: var(--color-text-medium);
}
.Button--borderless:hover {
  border-color: transparent;
  color: var(--color-text-medium);
}

.Button--onlyIcon {
  border: 1px solid #dcdde5;
  background: transparent;
  color: #7A819B;
  padding: 0;
}

.Button-group {
  display: inline-block;
  border-radius: var(--default-button-border-radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  clear: both;
}

.Button-group .Button {
  margin: 0;
  float: left;
  border-top: none;
  border-bottom: none;
  border-right: none;
  border-radius: 0;
  box-shadow: none;
}

.Button-group .Button--active {
  background-color: var(--color-success);
  color: var(--color-text-white);
}

.Button-group .Button:first-child {
  border-left: none;
}

.Button-group--blue {
  border-color: var(--color-border);
}

.Button-group--blue .Button {
  color: var(--color-text-medium);
}

.Button-group--blue .Button--active {
  background-color: var(--color-bg-medium);
  color: var(--color-brand);
}

.Button-group--brand {
  border-color: white;
}

.Button-group--brand .Button {
  border-color: white;
  color: var(--color-brand);
  background-color: var(--color-bg-medium);
}

.Button-group--brand .Button--active {
  background-color: var(--color-brand);
  color: white;
}

.Button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.Button--selected,
.Button--selected:hover {
  box-shadow: inset 0 1px 1px var(--color-shadow);
  background-color: var(--color-bg-light);
}

.Button--danger {
  background-color: var(--color-error);
  border-color: var(--color-error);
  color: var(--color-text-white);
}

.Button--danger:hover {
  color: white;
  background-color: var(--color-error);
  border-color: var(--color-error);
}

.Button--success {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-text-white);
}
.Button--success:hover {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-text-white);
}

.Button--withIcon {
  line-height: 1;
}

.Button--fullWidth {
  width: 100%;
}
