/* Buttons: one system for the whole site, pure CSS (replaces the 182x71 PNG .btn-primary,
   .button, .ui-char__btn and .ui-account__btn). Variants only swap the palette. */
.ui-btn {
  --btn-top: #3b4a4d;
  --btn-bottom: #222c2e;
  --btn-frame: #aeb6b4;
  --btn-frame-dark: #5d6664;
  --btn-text: #f2f4f3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 22px;
  box-sizing: border-box;
  border: 2px solid var(--btn-frame);
  border-radius: 4px;
  background: linear-gradient(to bottom, var(--btn-top), var(--btn-bottom));
  /* stone frame: dark outer line, bevel highlight on top, shade at the bottom */
  box-shadow:
    0 0 0 1px var(--btn-frame-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.35);
  color: var(--btn-text) !important;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  width: auto; /* the legacy theme fixes input widths */
  height: auto;
  margin: 0;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.ui-btn:hover {
  filter: brightness(1.18);
}
.ui-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 0 0 1px var(--btn-frame-dark),
    inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
.ui-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 1px var(--btn-frame-dark),
    0 0 0 4px rgba(201, 162, 39, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.ui-btn:disabled,
.ui-btn[aria-disabled="true"] {
  filter: grayscale(0.6) brightness(0.85);
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* variants: only the palette changes */
.ui-btn--gold {
  --btn-top: #d9b13a;
  --btn-bottom: #9a7714;
  --btn-frame: #f0dc92;
  --btn-frame-dark: #5e4a0e;
  --btn-text: #2a2005;
}
.ui-btn--green {
  --btn-top: #3f9444;
  --btn-bottom: #24602a;
  --btn-frame: #a9d6ab;
  --btn-frame-dark: #173d1b;
}
.ui-btn--danger {
  --btn-top: #b5403a;
  --btn-bottom: #7a211d;
  --btn-frame: #e2aaa6;
  --btn-frame-dark: #4a1210;
}
.ui-btn--ghost {
  background: rgba(255, 255, 255, 0.65);
  --btn-frame: #8d9694; --btn-frame-dark: transparent; --btn-text: #222c2e;
  box-shadow: none;
  border-width: 1px;
}
.ui-btn--ghost:hover {
  background: #fff;
  filter: none;
}

/* sizes */
.ui-btn--sm {
  min-height: 30px;
  padding: 0 12px;
  font-size: 11px;
}
.ui-btn--lg {
  min-height: 50px;
  padding: 0 32px;
  font-size: 13px;
}
.ui-btn--block {
  display: flex;
  width: 100%;
}
