﻿/* =========================================================================
   commands.css — page-specific styles for /commands
   Loaded on top of base.css. Uses the same --bg/--ink/--red/--line vars.
   ========================================================================= */

/* ---------- category tabs ---------- */
#categoryTabs{
  display:flex;
  gap:28px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:14px;
  margin-bottom:32px;
  border-bottom:1px solid var(--line);
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
#categoryTabs::-webkit-scrollbar{ display:none; }

.cmd-tab{
  background:none;
  border:none;
  border-bottom:2px solid transparent;
  padding:4px 0 12px;
  color:var(--dim);
  font-family:'Inter', sans-serif;
  font-size:14px;
  letter-spacing:.01em;
  white-space:nowrap;
  cursor:pointer;
  transition:color .25s ease, border-color .25s ease;
}
.cmd-tab:hover{ color:var(--body); }
.cmd-tab.active{
  color:var(--red-soft);
  border-bottom-color:var(--red);
}

/* ---------- search ---------- */
.cmd-search{
  width:100%;
  padding:13px 18px;
  margin-bottom:32px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:10px;
  color:var(--ink);
  font-family:'Inter', sans-serif;
  font-size:14.5px;
  transition:border-color .25s ease, background .25s ease;
}
.cmd-search::placeholder{ color:var(--dim); }
.cmd-search:focus{
  outline:none;
  border-color:var(--red);
  background:var(--bg-soft);
}

/* ---------- command grid ---------- */
#cmdGrid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(270px, 1fr));
  gap:16px;
  margin-bottom:24px;
}

@media (max-width:640px){
  #cmdGrid{ grid-template-columns:1fr; }
}

/* ---------- command card ---------- */
.cmd-card{
  padding:20px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  transition:border-color .25s ease, transform .25s ease, background .25s ease;
}
.cmd-card:hover{
  border-color:var(--red);
  background:var(--bg-soft);
  transform:translateY(-2px);
}

.cmd-name{
  font-family:'Fraunces', serif;
  font-weight:400;
  font-style:italic;
  font-size:16px;
  color:var(--red-soft);
  margin-bottom:8px;
  word-break:break-word;
}

.cmd-badge{
  display:inline-block;
  font-size:10.5px;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:4px 9px;
  margin-bottom:10px;
  background:var(--line-soft);
  border:1px solid var(--line);
  border-radius:5px;
  color:var(--dim);
}
.cmd-badge strong{
  color:var(--red-soft);
  font-weight:600;
}

.cmd-aliases{
  display:block;
  font-size:12px;
  color:var(--dim);
  margin-bottom:10px;
  font-family:'Courier New', monospace;
  word-break:break-word;
}

.cmd-desc{
  font-size:14px;
  color:var(--body);
  line-height:1.55;
  margin-bottom:14px;
}

.cmd-usage{
  font-size:12.5px;
  color:var(--dim);
}
.cmd-usage code{
  font-family:'Courier New', monospace;
  background:var(--line-soft);
  border:1px solid var(--line);
  padding:4px 8px;
  border-radius:5px;
  font-size:12px;
  color:var(--body);
  display:inline-block;
  max-width:100%;
  overflow-x:auto;
}

/* ---------- no results ---------- */
.no-results{
  display:none;
  text-align:center;
  padding:60px 20px;
  color:var(--dim);
  font-family:'Fraunces', serif;
  font-style:italic;
  font-size:16px;
}
.no-results.show{ display:block; }

/* ---------- responsive ---------- */
@media (max-width:640px){
  #categoryTabs{ gap:18px; margin-bottom:24px; }
  .cmd-tab{ font-size:13px; }
  .cmd-card{ padding:16px; }
  .cmd-name{ font-size:15px; }
}