/* Site base styles: plain-element defaults and the few helper classes the pages use.
   Colours come from the design tokens in wpsi-fluent-theme.css. */

/* —— Plain elements —— */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

hr {
  margin: 1rem 0;
  color: inherit;
  border: 0;
  border-top: 1px solid;
  opacity: 0.25;
}

h1, h2, h3, h4, h5, h6, .h2, .h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

h1 { font-size: calc(1.375rem + 1.5vw); }
h2, .h2 { font-size: calc(1.325rem + 0.9vw); }
h3 { font-size: calc(1.3rem + 0.6vw); }
h4 { font-size: calc(1.275rem + 0.3vw); }
h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }

@media (min-width: 1200px) {
  h1 { font-size: 2.5rem; }
  h2, .h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
  h4 { font-size: 1.5rem; }
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ol, ul {
  padding-left: 2rem;
}

ol, ul, dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

ol ol, ul ul, ol ul, ul ol {
  margin-bottom: 0;
}

dt { font-weight: 700; }
dd { margin-bottom: 0.5rem; margin-left: 0; }
blockquote, figure { margin: 0 0 1rem; }
b, strong { font-weight: bolder; }
small, .small { font-size: 0.875em; }

pre, code, kbd, samp {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  overflow: auto;
  font-size: 0.875em;
}

code {
  font-size: 0.875em;
  word-wrap: break-word;
}

img, svg { vertical-align: middle; }

table {
  caption-side: bottom;
  border-collapse: collapse;
}

th {
  text-align: inherit;
  text-align: -webkit-match-parent;
}

thead, tbody, tfoot, tr, td, th {
  border-color: inherit;
  border-style: solid;
  border-width: 0;
}

label { display: inline-block; }

button { border-radius: 0; }
button:focus:not(:focus-visible) { outline: 0; }

button, input, optgroup, select, textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button, select { text-transform: none; }
[role="button"] { cursor: pointer; }
textarea { resize: vertical; }

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  float: left;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: calc(1.275rem + 0.3vw);
  line-height: inherit;
}

legend + * { clear: left; }

iframe { border: 0; }
output { display: inline-block; }
summary { display: list-item; cursor: pointer; }
[hidden] { display: none !important; }

/* —— Page width —— */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

/* —— Flex helpers —— */
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* —— Spacing helpers —— */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.px-2 { padding-right: 0.5rem !important; padding-left: 0.5rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.w-100 { width: 100% !important; }

/* —— Text and boxes —— */
.text-start { text-align: left !important; }
.text-muted { color: var(--neutral-foreground-hint) !important; }
.text-danger { color: var(--error) !important; }
.text-info { color: var(--info) !important; }
.lead { font-size: 1.25rem; font-weight: 300; }
.form-label { margin-bottom: 0.5rem; }
.border { border: 1px solid var(--neutral-stroke-rest) !important; }
.border-top { border-top: 1px solid var(--neutral-stroke-rest) !important; }
.rounded { border-radius: 0.375rem !important; }
.shadow { box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 15%) !important; }

.form-check-input {
  width: 1em;
  height: 1em;
  margin-top: 0.25em;
  vertical-align: top;
  accent-color: var(--wpsi-accent);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* —— Messages, account menu, simple tables —— */
.wps-message {
  margin-bottom: 1rem;
}

.wps-message p {
  color: inherit;
}

.wps-message p:last-child {
  margin-bottom: 0;
}

.wps-subnav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wps-subnav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  color: var(--neutral-foreground-rest);
  text-decoration: none;
}

.wps-subnav-link:hover,
.wps-subnav-link:focus-visible {
  color: var(--neutral-foreground-hover);
  background: var(--neutral-fill-stealth-hover);
}

.wps-subnav-link.active {
  color: #fff;
  background: var(--wpsi-accent);
}

.wps-table {
  width: 100%;
  margin-bottom: 1rem;
}

.wps-table th,
.wps-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--neutral-stroke-rest);
  vertical-align: top;
}

.wps-inline-action {
  display: inline-flex;
  width: auto;
}
