/* Shared product components. Bootstrap variables follow the selected theme. */
body {
  --product-radius: 1rem;
  --product-shadow: 0 3px 16px rgb(15 23 42 / 5%);
  --text-muted: var(--bs-secondary-color);
}
body .card {
  border-color: var(--bs-border-color);
  border-radius: var(--product-radius);
  box-shadow: var(--product-shadow);
}
body .card-header {
  background-color: var(--bs-body-bg);
  border-bottom-color: var(--bs-border-color-translucent);
}
body .card-header:first-child {
  border-radius: calc(var(--product-radius) - 1px) calc(var(--product-radius) - 1px) 0 0;
}
body .card-footer:last-child {
  border-radius: 0 0 calc(var(--product-radius) - 1px) calc(var(--product-radius) - 1px);
}
body :is(.main-area, .wiki-main, .academy-shell) { min-width: 0; }
body :is(h1, h2) { text-wrap: balance; }
body .form-label { font-weight: 600; margin-bottom: .45rem; }
body :is(.form-control, .form-select, .input-group-text) {
  border-color: var(--bs-border-color);
  border-radius: .6rem;
}
body :is(.form-control, .form-select):focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .16);
}
/* Keep Bootstrap's joined edges for input groups. */
body .input-group > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
body .input-group > :not(:first-child):not(.dropdown-menu) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
body .btn { border-radius: .6rem; font-weight: 500; }
body .btn:not(.btn-sm):not(.btn-lg) { padding: .5rem .9rem; }
body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--bs-primary);
  outline-offset: 3px;
}
body .table { --bs-table-bg: transparent; vertical-align: middle; }
body .table > thead > tr > th {
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: .8rem;
  font-weight: 600;
  padding-top: .85rem;
  padding-bottom: .85rem;
}
body .table > tbody > tr > :is(td, th) { padding-top: .8rem; padding-bottom: .8rem; }
body .table-responsive { border-radius: .65rem; }
body .dropdown-menu {
  padding: .4rem;
  border-radius: .8rem;
  box-shadow: 0 12px 32px rgb(15 23 42 / 12%);
}
body .dropdown-item { border-radius: .4rem; padding: .5rem .75rem; white-space: normal; }
body :is(.sidebar, .wiki-global-sidebar) .nav-link {
  border-radius: .6rem;
  line-height: 1.45;
}
body .sidebar .nav-link:hover { background: var(--bs-tertiary-bg); }
body .alert { border-radius: .75rem; }
body .modal-content { border-radius: 1.1rem; }
body .pagination { flex-wrap: wrap; gap: .2rem; }
@media (max-width: 767.98px) {
  body .card-body:not(.p-0) { padding: 1rem; }
  body :is(.navbar, .topbar) .container-fluid { gap: .65rem; }
  body .navbar-brand { font-size: 1rem; }
  body :is(.btn, .nav-link, .dropdown-item, .page-link) { min-height: 2.5rem; }
  body :is(.form-control, .form-select) { font-size: 1rem; }
  body .table-responsive { overscroll-behavior-x: contain; }
  body .modal-dialog { margin: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  body *, body *::before, body *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
