/* ═══════════════════════════════════════════════════════════════
   W3NN COMMAND HUB — All Commands Page Styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── MAIN LAYOUT CONTAINER ─── */
.commands-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px 100px;
  z-index: 2;
  position: relative;
}

/* ─── HEADER & DESCRIPTION ─── */
.commands-header {
  text-align: center;
  margin-bottom: 40px;
}

.commands-desc {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

body.theme-minecraft .commands-desc {
  font-family: 'MinecraftRegular', monospace;
  color: #aaaaaa;
}

/* ─── SEARCH SECTION ─── */
.search-wrapper {
  position: relative;
  max-width: 500px;
  margin: 0 auto 40px;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  background: rgba(15, 20, 35, 0.6);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-input:focus {
  outline: none;
  border-color: var(--arcane);
  background: rgba(20, 25, 45, 0.8);
  box-shadow: 0 0 20px rgba(157, 111, 255, 0.25);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.25s ease;
}

.search-input:focus + .search-icon {
  color: var(--arcane);
}

body.theme-minecraft .search-input {
  font-family: 'MinecraftRegular', monospace;
  background: #2b2b2b;
  border: 3px solid #000;
  border-radius: 0;
  box-shadow: inset -2px -2px 0px #111, inset 2px 2px 0px #555;
  color: #fff;
  padding-left: 45px;
}

body.theme-minecraft .search-input:focus {
  border-color: #ffff55;
  box-shadow: none;
}

body.theme-minecraft .search-icon {
  left: 16px;
  color: #8b8b8b;
}

/* ─── ACCORDION LIST ─── */
.commands-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.command-item {
  background: rgba(10, 15, 30, 0.45);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.command-item:hover {
  border-color: rgba(157, 111, 255, 0.35);
  background: rgba(15, 20, 40, 0.55);
  transform: translateY(-1px);
}

.command-item.active {
  border-color: rgba(157, 111, 255, 0.5);
  background: rgba(15, 22, 45, 0.7);
}

body.theme-minecraft .command-item {
  background: #3c3c3c;
  border: 3px solid #000;
  border-radius: 0;
  box-shadow: inset -2px -2px 0px #222, inset 2px 2px 0px #666;
}

body.theme-minecraft .command-item:hover {
  background: #4a4a4a;
  transform: none;
}

body.theme-minecraft .command-item.active {
  background: #3c3c3c;
}

/* ─── ACCORDION TRIGGER (HEADER) ─── */
.command-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.command-trigger-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.command-name {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--diamond);
}

body.theme-minecraft .command-name {
  font-family: 'MinecraftRegular', monospace;
  color: #55ffff;
  text-shadow: 1px 1px 0px #005555;
  font-size: 16px;
}

.command-summary {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-secondary);
}

body.theme-minecraft .command-summary {
  font-family: 'MinecraftRegular', monospace;
  color: #aaaaaa;
  font-size: 12px;
}

.command-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.25s ease;
}

.command-item.active .command-chevron {
  transform: rotate(180deg);
  color: var(--arcane);
}

body.theme-minecraft .command-chevron {
  color: #8b8b8b;
}
body.theme-minecraft .command-item.active .command-chevron {
  color: #ffff55;
}

/* ─── ACCORDION CONTENT ─── */
.command-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.command-item.active .command-content {
  max-height: 500px; /* arbitrary high limit for expansion */
}

.command-content-inner {
  padding: 0 24px 24px;
  border-top: 1px dashed var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
  padding-top: 20px;
}

body.theme-minecraft .command-content-inner {
  border-top: 2px dashed #000;
}

/* Description inside expanded view */
.command-detail-desc {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

body.theme-minecraft .command-detail-desc {
  font-family: 'MinecraftRegular', monospace;
  color: #dddddd;
}

/* Syntax section */
.command-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.command-section-title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.theme-minecraft .command-section-title {
  font-family: 'MinecraftRegular', monospace;
  color: #ffff55;
  font-size: 10px;
  text-shadow: 1px 1px 0px #3f3f00;
}

.command-syntax-box {
  background: rgba(5, 7, 15, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #ffffff;
  overflow-x: auto;
  white-space: nowrap;
}

body.theme-minecraft .command-syntax-box {
  background: #141414;
  border: 2px solid #000;
  border-radius: 0;
  font-family: 'MinecraftRegular', monospace;
  color: #ffffff;
}

/* Example section with copy */
.command-example-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(157, 111, 255, 0.07);
  border: 1px solid rgba(157, 111, 255, 0.25);
  border-radius: var(--r-sm);
  padding: 8px 12px 8px 14px;
  gap: 12px;
}

body.theme-minecraft .command-example-box {
  background: #1d1d1d;
  border: 2px solid #000;
  border-radius: 0;
}

.command-example-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--arcane-light);
  overflow-x: auto;
  white-space: nowrap;
  user-select: all;
}

body.theme-minecraft .command-example-text {
  font-family: 'MinecraftRegular', monospace;
  color: #55ff55;
}

.command-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(157, 111, 255, 0.15);
  border: 1px solid rgba(157, 111, 255, 0.35);
  border-radius: var(--r-sm);
  color: var(--arcane-light);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.command-copy-btn:hover {
  background: rgba(157, 111, 255, 0.25);
  border-color: rgba(157, 111, 255, 0.5);
}

.command-copy-btn:active {
  transform: scale(0.95);
}

.command-copy-btn svg {
  width: 14px;
  height: 14px;
}

body.theme-minecraft .command-copy-btn {
  background: #555555;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: inset -1px -1px 0px #222, inset 1px 1px 0px #888;
  color: #fff;
  font-family: 'MinecraftRegular', monospace;
  text-shadow: 1px 1px 0px #000;
}

body.theme-minecraft .command-copy-btn:hover {
  background: #777777;
  box-shadow: inset -1px -1px 0px #333, inset 1px 1px 0px #aaa;
}

/* ─── NO RESULTS STATE ─── */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: rgba(10, 15, 30, 0.3);
  border: 1px dashed var(--border-light);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-family: var(--font-ui);
  display: none;
}

body.theme-minecraft .no-results {
  background: #2b2b2b;
  border: 3px dashed #000;
  border-radius: 0;
  font-family: 'MinecraftRegular', monospace;
  color: #8b8b8b;
}

/* ─── RICH ACCORDION METADATA ─── */
.command-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.meta-item {
  flex: 1;
  min-width: 150px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.theme-minecraft .meta-item {
  background: #2b2b2b;
  border: 2px solid #000;
  border-radius: 0;
}

.meta-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.theme-minecraft .meta-label {
  font-family: 'MinecraftRegular', monospace;
  color: #8b8b8b;
  font-size: 9px;
}

.meta-value {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

body.theme-minecraft .meta-value {
  font-family: 'MinecraftRegular', monospace;
  color: #ffffff;
  font-size: 11px;
}

/* ─── SYNTAX VARIANTS ─── */
.syntax-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.syntax-variant-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.syntax-desc {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 4px;
}

body.theme-minecraft .syntax-desc {
  font-family: 'MinecraftRegular', monospace;
  color: #aaaaaa;
  font-size: 11px;
}

/* ─── ARGUMENTS TABLE ─── */
.args-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  background: rgba(5, 7, 15, 0.4);
}

body.theme-minecraft .args-table-wrap {
  border: 2px solid #000;
  border-radius: 0;
  background: #141414;
}

.args-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 13.5px;
}

body.theme-minecraft .args-table {
  font-family: 'MinecraftRegular', monospace;
  font-size: 11px;
}

.args-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.theme-minecraft .args-table th {
  background: #2b2b2b;
  border-bottom: 2px solid #000;
  color: #ffff55;
  font-size: 10px;
}

.args-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.5;
}

body.theme-minecraft .args-table td {
  border-bottom: 2px solid #000;
  color: #dddddd;
}

.args-table tr:last-child td {
  border-bottom: none;
}

.arg-name {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--diamond-light);
  white-space: nowrap;
}

body.theme-minecraft .arg-name {
  font-family: 'MinecraftRegular', monospace;
  color: #55ffff;
}

/* ─── EXAMPLES LIST ─── */
.examples-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.example-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.example-note {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 4px;
}

body.theme-minecraft .example-note {
  font-family: 'MinecraftRegular', monospace;
  color: #8b8b8b;
  font-style: normal;
  font-size: 11px;
}

/* Increase max-height for accordion to account for larger contents */
.command-item.active .command-content {
  max-height: 2000px;
}
