/* ── CHEATSHEET HUB STYLES ─────────────────────────────────────── */

.cheatsheet-hub-wrapper {
  /* CSS Variables - scoped to wrapper only */
  --bg:        #1b1b1b;
  --surface:   #252525;
  --surface2:  #2e2e2e;
  --border:    #393939;
  --border2:   #444;
  --text:      #d4d4d4;
  --muted:     #777;
  --dim:       #555;
  --bright:    #ececec;
  --accent:    #01c5d1;
  --code:      #e8a045;
  --green:     #4ade80;
  --blue:      #60a5fa;
  --yellow:    #fbbf24;
  --orange:    #fb923c;
  --purple:    #a78bfa;
  --teal:      #01c5d1;
  --font:      'JetBrains Mono', monospace;
  --radius:    2px;

  /* Base styles */
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #d4d4d4;
}

.cheatsheet-hub-wrapper *,
.cheatsheet-hub-wrapper *::before,
.cheatsheet-hub-wrapper *::after {
  box-sizing: border-box;
}

/* Remove underlines only within cheatsheet content areas */
.cheatsheet-hub-wrapper .sticky-header *,
.cheatsheet-hub-wrapper .main *,
.cheatsheet-hub-wrapper .page-header * {
  text-decoration: none !important;
}

/* These selectors are from the original standalone HTML but not needed in Hugo */
/* Commented out to prevent conflicts with theme */
/* html { scroll-behavior: smooth; } */
/* body styles removed - using theme's body styles */

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.cheatsheet-hub-wrapper .page-header {
  padding: 28px 24px 0;
  max-width: 1400px;
  margin: 0 auto;
}

.cheatsheet-hub-wrapper .page-header .breadcrumb {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.cheatsheet-hub-wrapper .page-header .breadcrumb span { color: var(--dim); }

.cheatsheet-hub-wrapper .page-header h1 {
  font-size: 22px;
  color: var(--bright);
  font-weight: normal;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.cheatsheet-hub-wrapper .page-header p {
  font-size: 12px;
  color: var(--muted);
  max-width: 700px;
  line-height: 1.7;
}

/* ── STICKY HEADER (search + tabs) ──────────────────────────── */
.cheatsheet-hub-wrapper .sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* ── SEARCH ──────────────────────────────────────────────────── */
.cheatsheet-hub-wrapper .search-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px 8px;
  position: relative;
}

.cheatsheet-hub-wrapper .search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 0 12px;
  transition: border-color 0.15s;
}
.cheatsheet-hub-wrapper .search-inner:focus-within { border-color: var(--accent); }

.cheatsheet-hub-wrapper .search-prompt { color: var(--accent); font-size: 13px; flex-shrink: 0; }

#searchInput {
  background: none;
  border: none;
  outline: none;
  color: var(--bright);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 0;
  width: 100%;
  caret-color: var(--accent);
}
#searchInput::placeholder { color: var(--dim); }

.cheatsheet-hub-wrapper .search-count { font-size: 11px; color: var(--muted); flex-shrink: 0; white-space: nowrap; }

.cheatsheet-hub-wrapper .search-clear {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  flex-shrink: 0;
  font-family: var(--font);
  transition: color 0.15s;
}
.cheatsheet-hub-wrapper .search-clear:hover { color: var(--text); }

/* Dropdown results */
.cheatsheet-hub-wrapper .search-results {
  position: absolute;
  top: calc(100% - 8px);
  left: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  z-index: 300;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.cheatsheet-hub-wrapper .sr-group { border-bottom: 1px solid var(--border); }
.cheatsheet-hub-wrapper .sr-group:last-child { border-bottom: none; }

.cheatsheet-hub-wrapper .sr-group-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 14px 4px;
  background: var(--surface2);
  position: sticky;
  top: 0;
}

.cheatsheet-hub-wrapper .sr-item {
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background 0.1s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cheatsheet-hub-wrapper .sr-item:last-child { border-bottom: none; }
.cheatsheet-hub-wrapper .sr-item:hover, .sr-item.focused { background: var(--surface2); }

.cheatsheet-hub-wrapper .sr-item-title {
  font-size: 12px;
  color: var(--bright);
  line-height: 1.4;
}
.cheatsheet-hub-wrapper .sr-item-ctx {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

mark {
  background: rgba(1,197,209,.2);
  color: var(--accent);
  border-radius: 1px;
  padding: 0 1px;
}

.cheatsheet-hub-wrapper .search-hl {
  background: rgba(1,197,209,.15);
  color: var(--accent);
  border-radius: 1px;
  outline: 1px solid rgba(1,197,209,.35);
}

.cheatsheet-hub-wrapper .no-results {
  padding: 16px 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.cheatsheet-hub-wrapper .tab-scroll {
  overflow-x: auto;
  scrollbar-width: none;
}
.cheatsheet-hub-wrapper .tab-scroll::-webkit-scrollbar { display: none; }

.cheatsheet-hub-wrapper .tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
}

.cheatsheet-hub-wrapper .tab-bar li button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  font-size: 11.5px;
  padding: 10px 16px 9px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.cheatsheet-hub-wrapper .tab-bar li button:hover { color: var(--text); }
.cheatsheet-hub-wrapper .tab-bar li button.active {
  color: var(--bright);
  border-bottom-color: var(--accent);
}

/* ── MAIN LAYOUT ─────────────────────────────────────────────── */
.cheatsheet-hub-wrapper .main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* tab panels */
.cheatsheet-hub-wrapper .tab-panel { display: none; }
.cheatsheet-hub-wrapper .tab-panel.active { display: block; }

/* ── CONTENT COMPONENTS ─────────────────────────────────────── */

/* section title */
h2.section {
  font-size: 13px;
  font-weight: normal;
  color: var(--bright);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin: 28px 0 14px;
  letter-spacing: 0.3px;
}
h2.section:first-child { margin-top: 0; }

h3.sub {
  font-size: 12px;
  font-weight: normal;
  color: var(--yellow);
  margin: 20px 0 10px;
  letter-spacing: 0.3px;
}
h3.sub::before { content: '## '; color: var(--dim); }

/* grid */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius);
}

.card-title {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.card h3.sub { margin: 12px 0 6px; }
.card h3.sub:first-child { margin-top: 0; }
.card pre { margin: 8px 0; }
.card pre:first-child { margin-top: 0; }
.card pre:last-child { margin-bottom: 0; }
.card ul.rows:last-child li:last-child,
.card ul.checklist:last-child li:last-child { border-bottom: none; }

/* table */
.tbl-wrap { overflow-x: auto; margin: 12px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: normal;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border2);
}
td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }
td code, th code { font-family: var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }
td a { color: var(--accent); text-decoration: none; }
td a:hover { color: #fff; text-decoration: underline; }

/* code block */
pre {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 12px;
  line-height: 1.7;
  position: relative;
}
pre code {
  color: var(--text);
  font-family: var(--font);
}
/* comment colour in code */
pre .c { color: var(--dim); }
pre .k { color: var(--green); }
pre .s { color: var(--yellow); }

/* inline code */
code {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 11.5px;
  font-family: var(--font);
  color: var(--code);
}

pre code { background: none; border: none; padding: 0; color: var(--text); }

/* tag pills */
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid var(--border2);
  color: var(--text);
  background: var(--surface2);
  display: inline-block;
}
body .tag.red    { border-color: rgba(230,57,70,.5)  !important; color: #e63946 !important; background: rgba(230,57,70,.12) !important; }
body .tag.green  { border-color: rgba(74,222,128,.4) !important; color: #4ade80 !important; background: rgba(74,222,128,.08) !important; }
body .tag.blue   { border-color: rgba(96,165,250,.4) !important; color: #60a5fa !important; background: rgba(96,165,250,.08) !important; }
body .tag.yellow { border-color: rgba(251,191,36,.4) !important; color: #fbbf24 !important; background: rgba(251,191,36,.08) !important; }
body .tag.purple { border-color: rgba(167,139,250,.4)!important; color: #a78bfa !important; background: rgba(167,139,250,.08)!important; }
body .tag.teal   { border-color: rgba(1,197,209,.4) !important; color: #01c5d1 !important; background: rgba(1,197,209,.08) !important; }
body .tag.orange { border-color: rgba(251,146,60,.4) !important; color: #fb923c !important; background: rgba(251,146,60,.08) !important; }

/* note box */
.note {
  border-left: 3px solid var(--yellow);
  background: rgba(251,191,36,.05);
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.note strong { color: var(--yellow); }
.note.red  { border-color: #e63946; background: rgba(230,57,70,.05); }
.note.red strong { color: #e63946; }
.note.green { border-color: var(--green); background: rgba(74,222,128,.05); }
.note.green strong { color: var(--green); }
.note.blue  { border-color: var(--blue); background: rgba(96,165,250,.05); }
.note.blue strong { color: var(--blue); }

/* list */
ul.rows { list-style: none; font-size: 12px; }
ul.rows li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
ul.rows li::before { content: '›'; color: var(--dim); flex-shrink: 0; }
ul.rows li:last-child { border-bottom: none; }
ul.rows a { color: var(--accent); text-decoration: none; }
ul.rows a:hover { color: #fff; text-decoration: underline; }

/* query pills */
.cheatsheet-hub-wrapper .qpills { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.cheatsheet-hub-wrapper .qpill {
  font-size: 11px;
  padding: 2px 10px;
  background: rgba(1,197,209,.08);
  border: 1px solid rgba(1,197,209,.25);
  color: var(--accent);
  border-radius: 2px;
}

/* event id table – mono badge */
.cheatsheet-hub-wrapper .evid {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 2px;
  color: var(--blue);
  white-space: nowrap;
}

/* checklist */
ul.checklist { list-style: none; font-size: 12px; }
ul.checklist li {
  padding: 4px 0 4px 22px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,.03);
  line-height: 1.5;
}
ul.checklist li::before {
  content: '[ ]';
  position: absolute;
  left: 0;
  color: var(--dim);
}

/* 2-col layout helper */
.cheatsheet-hub-wrapper .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

hr.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── FOOTER ──────────────────────────────────────────────────── */
/* Site footer styles removed - using Hugo theme footer */

/* ── CLI OS TOGGLE ───────────────────────────────────────── */
.cheatsheet-hub-wrapper .cli-toggle {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
}
.cheatsheet-hub-wrapper .cli-os-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  padding: 5px 16px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.3px;
}
.cheatsheet-hub-wrapper .cli-os-btn.active {
  background: var(--surface2);
  color: var(--bright);
  border: 1px solid var(--border2);
}
.cheatsheet-hub-wrapper .cli-os-btn:not(.active):hover { color: var(--text); }
.cheatsheet-hub-wrapper .cli-os-section { display: none; }
.cheatsheet-hub-wrapper .cli-os-section.active { display: block; }

