/* =========================================
   Commands Page Styles
   ========================================= */

/* Page wrapper */
.page-commands {
  margin-bottom: 80px;
}

/* -----------------------------------------
   Hero banner
   ----------------------------------------- */
#commandsHero {
  position: relative;
  width: 100%;
  max-width: 900px;
  min-width: 500px;
  margin: 20px auto 0 auto;
}

#commandsHero .banner {
  background: #1f3c88;
  color: #fff;
  font-family: 'bronic', sans-serif;
  font-size: 80px;
  letter-spacing: 3px;
  text-align: center;
  padding: 12px 40px 22px 40px;
  border-radius: 55px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  text-shadow:
    -1px 0 1px #000,
     0 1px 1px #000,
     1px 0 1px #000,
     0 -1px 1px #000;
  position: relative;
}

#commandsHero .banner::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  width: 70%;
  height: 5px;
  background: #4d7fe7;
  border-radius: 3px;
  opacity: 0.9;
}

/* Plates on the main blue banner */
#commandsHero .plate {
  position: absolute;
  bottom: -16px;           /* match other horizontal plates */
  width: 92px;             /* horizontal plate size */
  height: 28px;
  background: #393e48;
  border: 1px solid #151515;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

#commandsHero .plate.left  { left: 8%;  transform: translateX(-50%); }
#commandsHero .plate.right { left: 92%; transform: translateX(-50%); }

#commandsHero .plate .bolt {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 40% 40%, #222 0 4px, #0f0f0f 5px 10px);
  border-radius: 50%;
}

#commandsHero .plate .bolt.one { left: 10px; top: 11px; }
#commandsHero .plate .bolt.two { right: 10px; top: 11px; }

#commandsHero .plate .bolt::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 18px;               /* just below the plate */
  width: 13px;
  height: 180px; /* base length */
  background-image: url("../../assets/images/chain.png");
  background-repeat: repeat-y;
  background-size: 13px auto;
}

/* Inner chains connect to the new header; outer chains hang lower */
#commandsHero .plate.left  .bolt.two::after,  /* inner left */
#commandsHero .plate.right .bolt.one::after { /* inner right */
  height: 40px; /* shorter to meet the header */
}

#commandsHero .plate.left  .bolt.one::after,  /* outer left */
#commandsHero .plate.right .bolt.two::after { /* outer right */
  height: 200px; /* longer to hang below header */
}

/* -----------------------------------------
   Filters (two columns)
   ----------------------------------------- */
#commandsFilters {
  position: relative;
  width: 100%;
  max-width: 1000px;
  min-width: 500px;
  margin: 18px auto 0 auto;
}

.filtersHeader {
  width: 100%;
  max-width: 1000px;
  margin: 30px auto 6px auto; /* lowered header */
}

.filtersHeaderBar {
  width: 75%;
  margin: 25px auto 0 auto; 
  height: 34px;
  border-radius: 20px;
  border: 1px solid #151515;
  background: #252525;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  color: #4d7fe7;
  font-family: 'bronic', sans-serif;
  font-size: 26px;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.filtersHeaderBar .label.left  { grid-column: 1; }
.filtersHeaderBar .label.right { grid-column: 2; }

.filtersGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px; /* columns closer together */
  align-items: start;
  justify-items: center;
  width: 75%;
  margin: auto;
}

.filterCol {
  position: relative;
  width: 100%;
}

.cmdTabs {
  width: 80%;
  margin: 12px auto 0 auto;
  display: grid;
  grid-auto-rows: min-content;
  gap: 20px;
}

.cmd_link {
  display: inline-block;
  min-width: 250px;
  padding: 0 18px;
  background: #393e48;
  color: #e6eeff;
  font-family: 'bronic', sans-serif;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 2px;
  text-align: center;
  position: relative;
  cursor: pointer;
  border-radius: 18px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.28);
  margin-top: 0; /* no movement */
  transition: background 0.25s ease, color 0.25s ease;
}

.cmd_link::before,
.cmd_link::after {
  content: "";
  position: absolute;
  bottom: 100%;
  width: 13px;
  height: 26px; /* connect visually to header plate */
  background-image: url("../../assets/images/chain.png");
  background-repeat: repeat-y;
  background-size: 13px auto;
  background-position: top center;
  z-index: -1;
}

.cmd_link::before { left: 20%; transform: translateX(-50%); }
.cmd_link::after  { left: 80%; transform: translateX(-50%); }

.cmd_link:hover:not(.active) {
  background: #404f59;
}

.cmd_link.active {
  background: #e6eeff;
  color: #151515;
  border-color: #000;
}

/* -----------------------------------------
   Dynamic header below filters
   ----------------------------------------- */
#commandsHeader {
  position: relative;
  width: 100%;
  max-width: 1000px;
  min-width: 500px;
  margin: 42px auto 0 auto;
  padding-top: 36px;
}

#commandsHeader .commandsHeaderPill {
  width: 100%;
  max-width: 1000px;
  min-width: 500px;
  margin: 0 auto 8px auto;
  height: 48px;
  background: #252525;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #e6eeff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.commandsTitle {
  font-family: 'bronic', sans-serif;
  font-size: 34px;
  letter-spacing: 2px;
}

.commandsTitle .cat  { color: #4d7fe7; }
.commandsTitle .perm { color: #4d7fe7; }

#commandsHeader .plate {
  position: absolute;
  top: 33px;               /* 3px above header top */
  width: 22px;             /* vertical style to match table area */
  height: 54px;            /* extends slightly above/below */
  background: #393e48;
  border: 1px solid #151515;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

#commandsHeader .plate.left  { left: -11px; }
#commandsHeader .plate.right { right: -11px; }

#commandsHeader .plate .bolt {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at 40% 40%, #222 0 3px, #0f0f0f 4px 8px);
  border-radius: 50%;
}

#commandsHeader .plate .bolt.one { top: 35px; }
#commandsHeader .plate .bolt.two { top: 11px; }

/* chains come from the plate bottom (single centered) */
#commandsHeader .plate .bolt::after { content: none !important; }
#commandsHeader .plate::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  width: calc(9px * 1.3);
  height: 230px;           /* hang alongside the tables */
  background-image: url("../../assets/images/chain.png");
  background-repeat: repeat-y;
  background-size: calc(9px * 1.3) auto;
}

/* -----------------------------------------
   Content sections
   ----------------------------------------- */
#commandsSections {
  width: 100%;
  max-width: 1100px;
  margin: 12px auto 80px auto;
}

.commandsSection {
  width: 90%;
  max-width: 940px;
  margin: 0 auto;
}

.panel {
  position: relative;
  margin: 18px auto 34px auto;
  padding-top: 18px;
}

.panelLabel {
  display: inline-block;
  background: #2f5eb6;
  color: #e6eeff;
  font-family: 'bronic', sans-serif;
  font-size: 18px;
  border: 1px solid #5080ea;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.45);
  border-radius: 10px;
  padding: 6px 12px;
  margin-left: 20px;
}

.panelBody {
  color: #e6eeff;
  font-family: 'fr-bold', sans-serif;
  text-align: center;
  padding: 18px;
}

/* -----------------------------------------
   Table (same visual as Collections)
   ----------------------------------------- */
.collectionsTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  font-size: 16px;
  color: #e6eeff;
}

.collectionsTable thead th {
  background: #2f3b52;
  color: #a9c5ff;
  text-align: left;
  padding: 10px 12px;
  font-family: 'fr-bold', sans-serif;
}

.collectionsTable thead th:first-child { border-top-left-radius: 10px; }
.collectionsTable thead th:last-child  { border-top-right-radius: 10px; }

.collectionsTable tbody td {
  background: #242b33;
  padding: 8px 12px;
  border-top: 1px solid #00000055;
  font-family: 'fr-bold', sans-serif;
  letter-spacing: 0.5px;
  font-size: 13px;
}

.collectionsTable tbody tr:nth-child(even) td { background: #29313c; }
.collectionsTable tbody tr:hover td         { background: #313b4c; }

.collectionsTable .empty {
  text-align: center;
  color: #98a9c9;
  font-family: 'fr-bold', sans-serif;
}

/* Search controls (reuse look from Collections) */
.quotesControls { width: 100%; margin: 0 auto 8px auto; display: flex; align-items: center; justify-content: flex-start; gap: 14px; }
.searchWrap { position: relative; display: inline-block; flex: 1 1 auto; }
#commandsSearch { width: 500px; max-width: 1260px; padding: 5px 10px; border: 1px solid #1d2630; border-radius: 10px; background: #1f1f1f; color: #e6eeff; outline: none; font-size: 18px; }
#commandsSearch::placeholder { color: #98a9c9; }
.qsClear { position: absolute; left: 470px; top: 50%; transform: translateY(-50%); background: transparent; color: #985555; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 0; }
.qsClear:hover { color: #e6eeff; }

/* Pagination controls aligned right of the search */
.cmdPagination { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cmdPagination[hidden] { display: none !important; }
.qpBtn { background: #393e48; color: #e6eeff; border: 1px solid #151515; border-radius: 10px; padding: 6px 12px; cursor: pointer; font-family: 'bronic', sans-serif; }
.cmdPagination .qpBtn { font-size: 48px; line-height: 28px; padding: 0; min-width: 25px; }
.qpBtn:hover { background: #4a4a4a; }
.cmdInfo { text-align: center; color: #a9c5ff; font-family: 'fr-bold', sans-serif; }
