/* Shared site styles: layout, fonts, header/nav, basic card styles */
:root {
  --blue-dark: #07121a;
  --blue-light: #0b1720;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #e6eef4; /* light text */
  background: var(--blue-dark); /* dark page background (matches header) */
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  background: var(--blue-light);
  color: #e6eef4;
  padding: 18px 0;
  border-bottom: 1px solid rgba(230,238,244,0.04);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}
.site-header .nav a {
  color: #e6eef4;
  text-decoration: none;
  margin-left: 16px;
  font-weight: 500;
}

/* Page sections / spacing */
.section {
  padding-top: 24px;
  padding-bottom: 24px;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  padding: 12px 0;
  color: #98a2b3;
  border-top: 1px solid rgba(15,23,32,0.04);
}

/* Cards, boxes, table-cards: dark backgrounds and light text */
.card,
.table-card,
.box,
.minibadge-card {
  background: var(--blue-light); /* slightly darker than header to create depth */
  color: #e6eef4;
  border-radius: 6px;
  padding: 12px;
  /* stronger, consistent drop shadow used on both pages */
  box-shadow: 0 10px 25px rgba(2,6,23,0.6);
  border: 1px solid rgba(230,238,244,0.03);
}

/* Force text wrapping for all content in cards, even long URLs without spaces */
.card-content,
.content,
.item-description,
.item-specialInstructions,
.item-solderingInstructions,
.item-howToAcquire,
.minibadge-card p,
.minibadge-card div {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
  overflow: hidden;
}

/* Ensure there's a single solid dark background across pages (override any per-page gradient) */
html, body {
  background-color: var(--blue-dark) !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

/* Ensure chart cards are solid and won't show repeating backgrounds,
   and match the same darker card color + shadow */
.charts .chart-card {
  background-color: var(--blue-light) !important;
  background-image: none !important;
  box-shadow: 0 10px 25px rgba(2,6,23,0.6) !important;
  border: 1px solid rgba(230,238,244,0.03) !important;
}



/* Form controls (inputs, selects) - dark style */
.input,
.select select,
textarea {
  background: var(--blue-light);
  color: #e6eef4;
  border: 1px solid rgba(230,238,244,0.06);
}
.button {
  border: 1px solid rgba(230,238,244,0.04);
}
.button.is-light {
  background: rgba(230,238,244,0.04);
  color: #e6eef4;
}

/* Tags */

/* Headings and subtitles */
h1, h2, h3, h4, .title, .subtitle {
  color: #e6eef4;
  font-size: 130%;
  font-weight: 500;
}

/* Helper text */
.help, .is-size-7, .has-text-grey-light {
  color: #98a2b3;
}

/* Make table backgrounds match */
table {
  width: 100%;
  border-collapse: collapse;
  color: #e6eef4;
}
table thead th {
  background: transparent;
  color: #e6eef4;
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(230,238,244,0.04);
}
table tbody td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

table.table {
  background-color: var(--blue-dark) !important; /* e.g., #2196F3 for a medium blue */
  color: white; /* or a contrasting color */
}

table.table tr:nth-child(odd) { /* For non-striped rows if any, or general row color */
  background-color: var(--blue-light) !important; /* e.g., #BBDEFB for a lighter blue */
}

table.table tr:nth-child(even) { /* For striped rows */
  background-color: var(--blue-dark) !important; /* e.g., #1976D2 for a darker blue */
  color: white; /* Ensure text is readable */
}

/* GitHub-style clickable title link */
.minibadge-title-link {
  display: inline-block;
  position: relative;
  text-decoration: underline;
  text-decoration-color: rgba(200, 200, 200, 0.2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, text-decoration-thickness 0.2s ease;
  padding-right: 1.4em;
}

.minibadge-title-link::after {
  content: '🔗';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 0.9em;
  pointer-events: none;
  margin-left: 0.3em;
}

.minibadge-title-link:hover {
  text-decoration-color: rgba(200, 200, 200, 0.5);
  text-decoration-thickness: 2px;
}

.minibadge-title-link:hover::after {
  opacity: 1;
}