/* Button size normalization: match Export button sizing */
:root{
  --btn-font-size: 0.85rem;
  --btn-line-height: 1.2;
  --btn-pad-y: 0.35rem;
  --btn-pad-x: 0.6rem;
  --btn-radius: 0.5rem;
}

/* If export dropdown defines its own sizing, adopt it as baseline */
.btn-export, .export-dd__btn, .export-dd .btn-export {
  font-size: var(--btn-font-size);
  line-height: var(--btn-line-height);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--btn-radius);
}

/* Normalize common buttons/links that behave like buttons */
button,
input[type="button"],
input[type="submit"],
a.btn,
a.button,
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success,
.btn-warning,
.btn-info {
  font-size: var(--btn-font-size);
  line-height: var(--btn-line-height);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--btn-radius);
}

/* Keep icon + text aligned */
button, .btn, a.btn, a.button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Prevent oversized buttons in tables/lists */
table button, table .btn, table a.btn { white-space: nowrap; }

/* Dark mode: ensure text is readable but not glaring */
@media (prefers-color-scheme: dark){
  button, .btn, a.btn, a.button { color: inherit; }
}
