/* TechGov theme for Mailman / HyperKitty / Postorius
   Minimal-risk version:
   - typography
   - colors
   - buttons
   - forms
   - cards / panels / tables
   - no structural layout changes
   - no hiding of functional elements
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&display=swap');

/* =========================
   1. Global base
   ========================= */
html, body {
  background-color: #EEEEEE;
  color: #000000;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.5;
}

/* =========================
   2. Typography
   ========================= */
body,
button,
input,
select,
textarea {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.page-header,
.card-title,
.panel-title {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #000000;
  font-weight: 400;
  letter-spacing: 0;
}

small,
.text-muted,
.helptext,
.form-text {
  color: #555555 !important;
}

/* =========================
   3. Links
   ========================= */
a {
  color: #4B0082;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #2f0050;
  text-decoration: underline;
}

/* =========================
   Header refinement (TechGov)
   ========================= */

/* Header background */
#navbar-main,
nav#navbar-main.navbar {
  background-color: #ffffff !important;
  background-image: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
  box-shadow: none !important;
}

/* Remove burger completely */
#navbar-main .navbar-toggler,
#navbar-main button.navbar-toggler,
#navbar-main .fa-bars {
  display: none !important;
}

/* Force nav to always be visible */
#navbar-main .navbar-collapse {
  display: flex !important;
  flex-basis: auto !important;
  visibility: visible !important;
}

/* Brand / title */
#navbar-main .navbar-brand,
#navbar-main .navbar-brand a,
#navbar-main .navbar-header a {
  color: #000000 !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

#navbar-main .navbar-brand:hover {
  color: #444444 !important;
}

/* Nav links */
#navbar-main .nav-link,
#navbar-main .navbar-nav .nav-link {
  color: #000000 !important;
  font-weight: 400 !important;
}

#navbar-main .nav-link:hover {
  color: #444444 !important;
}

/* Search input */
#navbar-main input[name="q"] {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid rgba(0, 0, 0, 0.18) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

#navbar-main input[name="q"]::placeholder {
  color: #666666 !important;
}

#navbar-main input[name="q"]:focus {
  border-color: #4B0082 !important;
  box-shadow: 0 0 0 0.12rem rgba(75, 0, 130, 0.15) !important;
}

/* Search button */
#navbar-main .search-button {
  background-color: #000000 !important;
  border: 1px solid #000000 !important;
  color: #ffffff !important;
  border-radius: 999px !important;
}

#navbar-main .search-button:hover {
  background-color: #222222 !important;
}

/* User button */
#navbar-main .user-button {
  background-color: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
}

#navbar-main .user-button:hover {
  background-color: #222222 !important;
}

/* Dropdown */
#navbar-main .dropdown-menu {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
}

#navbar-main .dropdown-item {
  color: #000000 !important;
}

#navbar-main .dropdown-item:hover {
  background-color: #f7f7f7 !important;
}
/* =========================
   5. Main containers
   ========================= */
.container,
.content,
main,
.panel,
.card,
.list-group-item,
.modal-content,
.well {
  background-color: #FFFFFF;
}

/* =========================
   6. Cards / panels / boxes
   ========================= */
.card,
.panel,
.well,
.list-group-item,
.modal-content,
.dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  box-shadow: none;
}

.card-header,
.panel-heading,
.modal-header,
.dropdown-header {
  background-color: #F7F7F7;
  color: #000000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 500;
}

/* =========================
   7. Buttons
   Conservative Bootstrap-friendly overrides
   ========================= */
.btn {
  font-family: "DM Sans", system-ui, sans-serif;
  border-radius: 6px;
  font-weight: 400;
  box-shadow: none;
}

.btn-primary {
  background-color: #000000;
  border-color: #000000;
  color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #222222;
  border-color: #222222;
  color: #FFFFFF;
}

.btn-secondary,
.btn-default,
.btn-light {
  background-color: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.18);
  color: #000000;
}

.btn-secondary:hover,
.btn-default:hover,
.btn-light:hover {
  background-color: #F3F3F3;
  border-color: rgba(0, 0, 0, 0.25);
  color: #000000;
}

.btn-link {
  color: #4B0082;
}

/* =========================
   8. Forms
   ========================= */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  box-shadow: none;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #4B0082;
  box-shadow: 0 0 0 0.12rem rgba(75, 0, 130, 0.15);
  outline: none;
}

label {
  color: #000000;
  font-weight: 400;
}

/* =========================
   9. Tables / message lists / archives
   ========================= */
table {
  background-color: #FFFFFF;
  color: #000000;
}

.table,
.table-striped,
.table-hover {
  --bs-table-bg: #FFFFFF;
}

.table thead th,
thead th {
  background-color: #F7F7F7;
  color: #000000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  font-weight: 500;
}

.table td,
.table th,
tbody td,
tbody th {
  border-color: rgba(0, 0, 0, 0.08);
}

/* =========================
   10. Alerts / notices
   ========================= */
.alert {
  border-radius: 6px;
  border-width: 1px;
}

.alert-info {
  background-color: #F6F3FA;
  border-color: rgba(75, 0, 130, 0.18);
  color: #000000;
}

.alert-success {
  background-color: #F4F7F4;
  border-color: rgba(0, 0, 0, 0.10);
  color: #000000;
}

.alert-warning {
  background-color: #FCF8EE;
  border-color: rgba(0, 0, 0, 0.10);
  color: #000000;
}

.alert-danger {
  background-color: #FAF0F0;
  border-color: rgba(0, 0, 0, 0.10);
  color: #000000;
}

/* =========================
   11. Footer
   ========================= */
footer,
.footer {
  background-color: transparent;
  color: #000000;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

footer a,
.footer a {
  color: #000000;
}

footer a:hover,
.footer a:hover {
  color: #444444;
}

/* =========================
   12. Utility touches
   ========================= */
hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.badge,
.label {
  border-radius: 999px;
  font-weight: 400;
}

.listing a,
.thread a,
.message a,
.subject a,
.card a {
  word-break: break-word;
}
/* =========================
   HyperKitty list name hover fix
   ========================= */

a.list-name,
a.list-name:visited {
  color: #4B0082 !important;
}

a.list-name:hover,
a.list-name:focus {
  color: #2f0050 !important;
  text-decoration: none !important;
}

td:hover a.list-name,
td:focus a.list-name,
tr:hover a.list-name,
tr:focus a.list-name {
  color: #2f0050 !important;
}

/* Keep row readable on hover without breaking charts */
tr:hover td,
tr:focus td {
  background-color: #f7f7f7 !important;
  color: #000000 !important;
}

/* Preserve activity chart visibility on hover */
td.activity svg,
td.activity svg *,
td.activity .chart,
td.activity .chart * {
  opacity: 1 !important;
}

td.activity svg rect,
tr:hover td.activity svg rect,
tr:focus td.activity svg rect {
  fill-opacity: 1 !important;
  stroke: none !important;
}

/* Keep chart grid subtle but visible */
td.activity svg .grid line,
td.activity svg .grid path,
tr:hover td.activity svg .grid line,
tr:hover td.activity svg .grid path {
  stroke: rgba(0, 0, 0, 0.12) !important;
}

/* Keep the bars blue on hover */
td.activity svg .bars rect,
tr:hover td.activity svg .bars rect,
tr:focus td.activity svg .bars rect {
  fill: #4B79D8 !important;
  opacity: 1 !important;
}
/* =========================
   Postorius header refinement
   ========================= */

header.bd-navbar,
header.navbar.bd-navbar,
header .navbar-default,
nav#header-nav,
#header-nav {
  background-color: #ffffff !important;
  background-image: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
  box-shadow: none !important;
}

header.bd-navbar .navbar-brand,
header.bd-navbar .navbar-brand a,
header.bd-navbar .nav-link,
header.bd-navbar a.nav-link {
  color: #000000 !important;
}

header.bd-navbar .navbar-brand:hover,
header.bd-navbar .nav-link:hover {
  color: #444444 !important;
}

header.bd-navbar .navbar-toggler,
header.bd-navbar .fa-bars {
  display: none !important;
}

header.bd-navbar .navbar-collapse {
  display: flex !important;
  flex-basis: auto !important;
  visibility: visible !important;
}
/* =========================
   Postorius brand override
   ========================= */

/* Hide Mailman logo */
header.bd-navbar .navbar-brand img {
  display: none !important;
}

/* Hide default "Postorius" text */
header.bd-navbar .navbar-brand span {
  font-size: 0 !important;
}

/* Replace with TechGov label */
header.bd-navbar .navbar-brand span::after {
  content: "lists.techgov.digital";
  font-size: 16px;
  color: #000000;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 500;
}
/* =========================
   TechGov footer
   ========================= */

/* Hide default Mailman footer content */
footer.footer p {
  display: none !important;
}

/* Footer container */
.tgd-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 80px 20px 40px 20px;
  font-family: "DM Sans", sans-serif;
  color: #000000;
}

/* Title */
.tgd-footer-title {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 8px;
}

/* Divider */
.tgd-footer-rule {
  height: 1px;
  background: rgba(0, 0, 0, 0.35);
  margin: 8px 0 20px 0;
}

/* Links list */
.tgd-footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Links */
.tgd-footer-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  color: #000000 !important;
  text-decoration: none;
}

.tgd-footer-link:hover {
  color: #444444 !important;
}

/* Arrow */
.tgd-arrow {
  transform: translateY(-1px);
}

/* Small HyperKitty mention */
.tgd-footer-note {
  margin-top: 30px;
  font-size: 12px;
  color: #666666;
}
