/* ============================================================
   SCRAP GROUP — Bot Commands (commands-page.css)
   Self-contained, mirrors checkout-page.css's approach: no
   dependency on legacy stylesheets so nothing here fights
   !important rules from luxury.css / legacy-critical.css.
   ============================================================ */

:root {
  --chrome-1: #ffffff;
  --chrome-2: #d7dbe4;
  --chrome-3: #9aa0ad;
  --chrome-4: #6b7080;
  --line: rgba(226, 230, 238, .14);
  --line-2: rgba(226, 230, 238, .28);
  --metal: linear-gradient(180deg, #ffffff 0%, #dfe3ea 42%, #a7adba 72%, #eef1f6 100%);
  --glass: linear-gradient(180deg, rgba(22, 24, 29, .66), rgba(8, 9, 12, .9));
  --ink: #eef1f6;
  --muted: #9aa0ad;
  --glass-fill: rgba(255, 255, 255, .055);
  --glass-line: rgba(255, 255, 255, .14);
  --fd: 'Space Grotesk', 'Cairo', system-ui, sans-serif;
  --fs: 'Cormorant Garamond', Georgia, serif;
  --fb: 'Raleway', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fb);
  color: var(--ink);
  background: #050506;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58% 44% at 50% 0%, rgba(150, 160, 180, .10), transparent 62%),
    radial-gradient(40% 40% at 88% 10%, rgba(201, 205, 214, .08), transparent 64%),
    linear-gradient(180deg, #050506, #020203 62%, #050506);
}

a { color: inherit; }

/* ── Language switch ───────────────────────────────────── */
.lang-switch {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(10, 12, 18, .8);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 4px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #e5e8f0;
  font-family: var(--fb);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-btn:hover { background: rgba(255, 255, 255, .08); }
.lang-btn.is-on { background: rgba(226, 230, 238, .22); color: #fff; }
.lang-flag { border-radius: 3px; display: block; }

/* ── Shell ──────────────────────────────────────────────── */
.cm-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 28px 90px; position: relative; }

/* Physical left/right (not inset-inline-*) keyed off html[dir], not logical properties --
   .lang-switch forces direction:ltr !important on itself (to keep the flag+label pill's own
   content order fixed), and since inset-inline-* resolves against an element's OWN computed
   direction, that override was also flipping cm-lang-float's positioning, landing it on the
   same physical side as cm-home-float in RTL (the two floats silently overlapped, hiding the
   home button behind the wider language switcher). */
.cm-lang-float { position: absolute; top: 28px; right: 28px; }
html[dir="rtl"] .cm-lang-float { right: auto; left: 28px; }

.cm-home-float {
  position: absolute;
  top: 28px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(10, 12, 18, .8);
  color: #e5e8f0;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .2s, color .2s, border-color .2s;
}
html[dir="rtl"] .cm-home-float { left: auto; right: 28px; }
.cm-home-float:hover { background: rgba(255, 255, 255, .08); border-color: var(--line-2); color: #fff; }

.cm-head { margin: 26px 0 30px; text-align: center; }
.cm-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--chrome-3);
  margin-bottom: 16px;
}
.cm-eyebrow::before, .cm-eyebrow::after { content: ''; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--chrome-3), transparent); }
.cm-bot-switch { justify-content: center; margin: 0 0 18px; }
.cm-bot-switch .cm-tab { padding: 10px 26px; font-size: 12px; }
.cm-title {
  margin: 0 0 14px;
  font-family: var(--fd);
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .04em;
  color: #f3f5f9;
}
.cm-title em {
  display: block;
  font-family: var(--fs);
  font-style: italic;
  letter-spacing: .01em;
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: .94;
}
.cm-sub { max-width: 560px; margin: 0 auto; font-size: 13.5px; font-weight: 300; line-height: 1.9; color: var(--muted); }
.cm-sub code {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  color: var(--chrome-2);
  font-family: var(--fb);
  font-weight: 700;
  direction: ltr;
}

/* ── Search + filters ───────────────────────────────────── */
.cm-tools { position: sticky; top: 0; z-index: 5; padding: 14px 0; margin-bottom: 6px; background: linear-gradient(180deg, #050506 68%, transparent); }
.cm-search {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: #fff;
  font-family: var(--fb);
  font-size: 15px;
  outline: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  transition: border-color .25s, box-shadow .25s;
}
.cm-search::placeholder { color: var(--chrome-4); }
.cm-search:focus { border-color: var(--line-2); box-shadow: 0 0 0 3px rgba(226, 230, 238, .09), 0 16px 40px rgba(0, 0, 0, .4); }

.cm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cm-tab {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  color: var(--chrome-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.cm-tab:hover { border-color: var(--line-2); color: var(--chrome-1); }
.cm-tab.is-active { background: var(--metal); color: #14161c; border-color: transparent; font-weight: 800; }
.cm-tab .cm-count { opacity: .65; font-weight: 500; margin-inline-start: 4px; }
.cm-tab.is-active .cm-count { opacity: .55; }

/* ── Command grid ───────────────────────────────────────── */
.cm-groups { margin-top: 26px; display: flex; flex-direction: column; gap: 34px; }
.cm-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-family: var(--fd);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #f3f5f9;
}
.cm-group-title::after { content: ''; flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.cm-group-title small { font-family: var(--fb); font-size: 10px; font-weight: 700; color: var(--chrome-4); letter-spacing: .1em; }

.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

.cm-card {
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: border-color .25s, transform .25s var(--ease), background .25s;
}
.cm-card:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .085); transform: translateY(-2px); }
.cm-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cm-cmd {
  font-family: var(--fb);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--chrome-1);
  direction: ltr;
  unicode-bidi: isolate;
}
.cm-badge {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .08);
  color: var(--chrome-2);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .1em;
  white-space: nowrap;
}
.cm-desc { margin: 0; font-size: 12.5px; font-weight: 300; line-height: 1.85; color: var(--chrome-2); }

.cm-empty {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--chrome-4);
  font-size: 13px;
}
.cm-empty.is-visible { display: block; }

@media (max-width: 640px) {
  .cm-wrap { padding-inline: 16px; }
  .cm-tools { top: 0; }
  .cm-top-float-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }
  .cm-home-float, .cm-lang-float { position: static; }
}
