/* ============================================================
   cmd-palette.css  —  Command Palette (Ctrl+K)  PhonePro POS
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
#cmdOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(30, 30, 40, .45);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
#cmdOverlay.is-open {
  display: flex;
}

/* ── Panel ───────────────────────────────────────────────── */
#cmdPanel {
  width: 100%;
  max-width: 580px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,.22), 0 4px 12px rgba(0,0,0,.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Input row ───────────────────────────────────────────── */
#cmdInputRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #eaeef3;
}
.cmd-search-icon {
  font-size: 15px;
  color: #9aa5b4;
  flex-shrink: 0;
}
#cmdInput {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #1a202c;
  background: transparent;
  font-family: inherit;
}
#cmdInput::placeholder { color: #b0bac6; }
#cmdKbd {
  font-size: 11px;
  color: #9aa5b4;
  background: #f1f3f6;
  border: 1px solid #dde2e8;
  border-radius: 5px;
  padding: 2px 7px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Results list ────────────────────────────────────────── */
#cmdResults {
  max-height: 400px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ── Group label ─────────────────────────────────────────── */
.cmd-group-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #9aa5b4;
  padding: 10px 18px 4px;
}

/* ── Result item ─────────────────────────────────────────── */
.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  text-decoration: none;
  color: #2d3748;
  transition: background .1s;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.cmd-item:hover,
.cmd-item.is-selected {
  background: #f0edfd;
  border-left-color: #7460ee;
  text-decoration: none;
  color: #2d3748;
}
.cmd-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f4f6f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  color: #7460ee;
}
.cmd-item__body {
  flex: 1;
  min-width: 0;
}
.cmd-item__title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-item__sub {
  font-size: 12px;
  color: #9aa5b4;
  margin-top: 1px;
}
.cmd-item__arrow {
  font-size: 11px;
  color: #cbd2db;
  flex-shrink: 0;
}
mark {
  background: #e9e1ff;
  color: #5f3dc4;
  border-radius: 3px;
  padding: 0 1px;
}

/* ── Footer ──────────────────────────────────────────────── */
#cmdFooter {
  display: flex;
  gap: 16px;
  padding: 8px 18px;
  border-top: 1px solid #eaeef3;
  background: #fafbfc;
}
.cmd-hint {
  font-size: 11.5px;
  color: #9aa5b4;
}
.cmd-hint kbd {
  font-size: 10.5px;
  background: #edf0f5;
  border: 1px solid #d2d8e0;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
}

/* ── Trigger button in original sidebar ──────────────────── */
#sb-cmd-trigger {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 6px 12px 2px;
  padding: 7px 12px !important;
  border-radius: 8px;
  background: #f4f6f9 !important;
  border: 1px solid #e4e8ef !important;
  color: #9aa5b4 !important;
  cursor: pointer;
  text-decoration: none !important;
  font-size: 13px;
  transition: background .15s, border-color .15s;
}
#sb-cmd-trigger:hover {
  background: #eceeff !important;
  border-color: #c5bafc !important;
  color: #7460ee !important;
}
#sb-cmd-trigger .fas.fa-search {
  font-size: 12px;
  flex-shrink: 0;
}
.cmd-trigger__text {
  flex: 1;
  font-size: 12.5px;
}
.cmd-trigger__kbd {
  font-size: 10px;
  background: #e8ecf1;
  border: 1px solid #d2d8e0;
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* Mini-sidebar: ocultar texto, sólo el ícono */
.mini-sidebar #sb-cmd-trigger .cmd-trigger__text,
.mini-sidebar #sb-cmd-trigger .cmd-trigger__kbd {
  display: none;
}
.mini-sidebar #sb-cmd-trigger {
  justify-content: center;
  margin: 6px 4px 2px;
  padding: 7px 0 !important;
}
