/* Shared typography for portal workspaces, authentication and documentation. */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');

:root {
  --portal-font: "Ubuntu", system-ui, sans-serif;
  --bs-font-sans-serif: var(--portal-font);
  --bs-body-font-family: var(--portal-font);
}
body, button, input, select, textarea, optgroup,
h1, h2, h3, h4, h5, h6, p, a, label, small, strong, table,
.tooltip, .popover, .swal2-popup {
  font-family: var(--portal-font) !important;
}
body { font-weight: 400; }

body:not([data-pc-theme="dark"]):not(.dark-theme) {
  --portal-ink: #000;
  --portal-muted: #000;
  --bs-body-color: #000;
  --bs-body-color-rgb: 0, 0, 0;
  --bs-secondary-color: #000;
  --bs-secondary-color-rgb: 0, 0, 0;
  --bs-heading-color: inherit;
  --text: #000;
  --muted: #000;
  --ink: #000;
  color: #000;
}

/* Keep inverse panels, buttons and status colours intact. */
body:not([data-pc-theme="dark"]):not(.dark-theme)
:is(h1,h2,h3,h4,h5,h6,p,label,small,.text-muted,.text-secondary,.text-body-secondary,.form-text,.form-control,.form-select,.dropdown-item,.sd-stat,.sd-empty,.dataTables_info):not(:where(.pc-sidebar *, .portal-sidebar *, [class*="hero"] *, .welcome-panel *, .left-panel *, .dev-story *, .btn *, .badge *, .alert *, .bg-dark *, .bg-primary *, .bg-success *, .bg-danger *, .text-bg-dark *, .text-bg-primary *, .text-white, .text-white *, .text-light, .text-light *)) {
  color: #000 !important;
}
body:not([data-pc-theme="dark"]):not(.dark-theme) .table {
  --bs-table-color: #000;
  --bs-table-striped-color: #000;
  --bs-table-hover-color: #000;
}
body:not([data-pc-theme="dark"]):not(.dark-theme) :is(.table th,.table td) { color: #000; }
body:not([data-pc-theme="dark"]):not(.dark-theme) .staff-dash { --sd-ink:#000; }
body:not([data-pc-theme="dark"]):not(.dark-theme) .sd-gauge text { fill:#000; }
body:not([data-pc-theme="dark"]):not(.dark-theme) :is(input,textarea)::placeholder { color:#333; opacity:1; }

/* Dark surfaces need their own heading token: excluding a selector alone does
   not stop Bootstrap headings from inheriting a light-page colour variable. */
:is(.welcome-panel,.left-panel,.dev-story,.pc-sidebar,.portal-sidebar,
    .sd-hero,.student-profile-hero,.department-insight-hero,
    .bg-dark,.bg-primary,.text-bg-dark,.text-bg-primary) {
  --bs-heading-color: #fff;
}
:is(.welcome-panel,.left-panel,.dev-story) :is(h1,h2,h3,h4,h5,h6) {
  color:#fff;
}
