/* Shared button system. Load after page styles. Use .button for primary
   actions and .button.secondary for discovery actions. Text links stay links.
   Specificity deliberately supersedes legacy page styles without !important. */
:root {
  --button-ivory: #e9e7e0;
  --button-olive: #29372e;
  --button-surface: var(--button-ivory);
  --button-text: var(--button-olive);
  --button-outline: var(--button-ivory);
  --button-hover: #d9d7cc;
  --button-tint: rgb(233 231 224 / 9%);
  --button-height: 44px;
  --button-radius: 10px;
}
/* The same two variants adapt to light sections. New light sections may use
   data-button-theme="light"; dark sections nested inside can use "dark". */
:is(.site-header, .site-footer, #ueber, .journal-editorial, [data-button-theme="light"]) {
  --button-surface: var(--button-olive);
  --button-text: var(--button-ivory);
  --button-outline: var(--button-olive);
  --button-hover: #3b4a3e;
  --button-tint: rgb(41 55 46 / 8%);
}
[data-button-theme="dark"] {
  --button-surface: var(--button-ivory);
  --button-text: var(--button-olive);
  --button-outline: var(--button-ivory);
  --button-hover: #d9d7cc;
  --button-tint: rgb(233 231 224 / 9%);
}
:root:root body :is(.button, .nav-book, button) {
  box-sizing: border-box;
  min-height: var(--button-height);
  height: var(--button-height);
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  padding: 10px 22px;
  border: 1px solid var(--button-surface);
  border-radius: var(--button-radius);
  background: var(--button-surface);
  color: var(--button-text);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  line-height: 22px;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  box-shadow: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
:root:root body :is(.button, .nav-book) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
:root:root body :is(.button.secondary, .menu-toggle, .dialog-close, .review-arrow) {
  background: transparent;
  color: var(--button-outline);
  border-color: var(--button-outline);
}
:root:root body .review-arrow { width: var(--button-height); padding-inline: 0; }
:root:root body .button span { font-size: inherit; }
/* Keep paired actions content-sized; wrap the group when space runs out,
   never the label. This also replaces legacy full-width mobile buttons. */
:root:root body :is(.actions, .offer-inquiry-actions) {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
:root:root body :is(.button, .nav-book, button):focus-visible {
  outline: 2px solid var(--button-outline);
  outline-offset: 4px;
}
@media (hover: hover) {
  :root:root body :is(.button, .nav-book, button):not(:disabled):hover {
    background: var(--button-hover);
    color: var(--button-text);
    border-color: var(--button-hover);
    text-decoration: none;
  }
  :root:root body :is(.button.secondary, .menu-toggle, .dialog-close, .review-arrow):not(:disabled):hover {
    background: var(--button-tint);
    color: var(--button-outline);
    border-color: var(--button-outline);
  }
}
:root:root body :is(.button, .nav-book, button):disabled {
  opacity: .6;
  cursor: default;
}
@media (prefers-reduced-motion: reduce) {
  :root:root body :is(.button, .nav-book, button) { transition: none; }
}
