/* Default styling for bare <button> and input[type=submit|button|reset]
   elements (the admin SPA uses unstyled buttons via Common.button).
   The .nice-button family below stays untouched thanks to :not(). */
button:not(.nice-button),
input[type="submit"]:not(.nice-button),
input[type="button"]:not(.nice-button),
input[type="reset"]:not(.nice-button) {
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--font-dark);
  background: var(--background-light);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  box-shadow: var(--button-shadow);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.2s ease,
    color 0.15s ease,
    transform 0.05s ease;
  letter-spacing: 0.01em;
}

button:not(.nice-button):hover,
input[type="submit"]:not(.nice-button):hover,
input[type="button"]:not(.nice-button):hover,
input[type="reset"]:not(.nice-button):hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--button-shadow-hover);
  transform: translateY(-1px);
}

button:not(.nice-button):active,
input[type="submit"]:not(.nice-button):active,
input[type="button"]:not(.nice-button):active,
input[type="reset"]:not(.nice-button):active {
  transform: translateY(0);
  box-shadow: var(--button-shadow);
}

button:not(.nice-button):focus-visible,
input[type="submit"]:not(.nice-button):focus-visible,
input[type="button"]:not(.nice-button):focus-visible,
input[type="reset"]:not(.nice-button):focus-visible {
  outline: none;
  box-shadow: var(--button-shadow), var(--focus-ring);
}

button:not(.nice-button):disabled,
button:not(.nice-button)[disabled],
input[type="submit"]:not(.nice-button):disabled,
input[type="submit"]:not(.nice-button)[disabled],
input[type="button"]:not(.nice-button):disabled,
input[type="button"]:not(.nice-button)[disabled],
input[type="reset"]:not(.nice-button):disabled,
input[type="reset"]:not(.nice-button)[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--surface-subtle);
  border-color: var(--border-subtle);
  color: var(--font-muted);
  box-shadow: none;
  transform: none;
}

button:not(.nice-button):disabled:hover,
button:not(.nice-button)[disabled]:hover,
input[type="submit"]:not(.nice-button):disabled:hover,
input[type="submit"]:not(.nice-button)[disabled]:hover,
input[type="button"]:not(.nice-button):disabled:hover,
input[type="button"]:not(.nice-button)[disabled]:hover,
input[type="reset"]:not(.nice-button):disabled:hover,
input[type="reset"]:not(.nice-button)[disabled]:hover {
  background: var(--surface-subtle);
  color: var(--font-muted);
  border-color: var(--border-subtle);
  transform: none;
  box-shadow: none;
}

.nice-button {
  border: 0;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  line-height: initial;
  box-shadow: var(--button-shadow);
  transition:
    background-color 0.15s ease,
    box-shadow 0.2s ease,
    transform 0.05s ease;
  letter-spacing: 0.01em;
}

.nice-button:hover {
  cursor: pointer;
  box-shadow: var(--button-shadow-hover);
  transform: translateY(-1px);
}
.nice-button:active {
  transform: translateY(0);
  box-shadow: var(--button-shadow);
}
.nice-button:focus-visible {
  outline: none;
  box-shadow: var(--button-shadow), var(--focus-ring);
}
.nice-button[disabled]:hover {
  cursor: initial;
  background: initial;
  transform: none;
  box-shadow: var(--button-shadow);
}

.nice-button[disabled] {
  opacity: 0.5;
}

.nice-button--blue {
  background: var(--button-blue);
  color: var(--font-light);
}
.nice-button--blue:hover {
  background: var(--button-blue-hover);
}
.nice-button--blue:active {
  background: var(--button-blue-active);
}

.nice-button--white {
  background: var(--button-white);
  color: var(--font-dark);
}
.nice-button--white:hover {
  background: var(--button-white-hover);
}
.nice-button--white:active {
  background: var(--button-white-active);
}

.nice-button--grey {
  background: var(--button-grey);
  color: var(--font-light);
}
.nice-button--grey:hover {
  background: var(--button-grey-hover);
}
.nice-button--grey:active {
  background: var(--button-grey-active);
}

.nice-button--default {
  background: var(--button-default);
  color: var(--font-dark);
}
.nice-button--default:hover {
  background: var(--button-default-hover);
}
.nice-button--default:active {
  background: var(--button-default-active);
}
