.base-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.base-button--primary {
  background-color: var(--c-brand);
  color: var(--c-brand-text);
}

.base-button--primary:hover {
  filter: brightness(1.1);
}

.base-button--secondary {
  background-color: transparent;
  color: var(--c-base-text);
  border: 1px solid var(--c-border);
}

.base-button--secondary:hover {
  background-color: var(--c-border);
}

.base-button--full-width {
  width: 100%;
}

.base-button--danger {
  background-color: var(--c-error);
  color: var(--c-brand-text);
}

.base-button--danger:hover {
  filter: brightness(1.1);
}

.base-button--secondary-brand {
  background-color: var(--c-brand-secondary);
  color: var(--c-brand-text);
}

.base-button--secondary-brand:hover {
  filter: brightness(1.1);
}

.base-button--small {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

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

.base-button:disabled:hover {
  filter: none;
}

/* BankID is somebody else's brand on our page, so it gets a neutral grey rather than
   ava's blue — a coloured button implying it is our own action would be misleading, and
   BankID's UX guidelines govern how their mark may be presented.

   Dark enough to carry a WHITE label and mark, which is what Bank iD's white asset
   needs behind it. 70% is not arbitrary: mixed lighter it stops meeting WCAG AA against
   white (55% lands on #818181 at 3.90:1, below the 4.5:1 floor). This lands on #5F5F5F
   at 6.39:1. Lighten it and the text has to go dark — the two are one decision.

   The inlined mark uses currentColor, so it follows the label without a second asset. */
.base-button--bankid {
  background-color: color-mix(in srgb, var(--c-base-text) 70%, var(--c-app-bg));
  color: var(--c-brand-text);
}

.base-button--bankid:hover {
  filter: brightness(1.1);
}
