/* AI Commander — shared styles (nav, footer, buttons, base) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:               #ffffff;
  --text:             #111111;
  --muted:            #6b7280;
  --subtle:           #9ca3af;
  --border:           #e5e7eb;
  --surface:          #f9fafb;
  --term-bg:          #0d1117;
  --term-border:      #30363d;
  --term-bar:         #161b22;
  --term-text:        #c9d1d9;
  --term-muted:       #6e7681;
  --term-green:       #3fb950;
  --term-yellow:      #e3b341;
  --term-red:         #f85149;
  --term-blue:        #79c0ff;
  --term-orange:      #ffa657;
  --accent:           #f97316;
  --accent-bg:        #fff7ed;
  --accent-border:    #fed7aa;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav-spacer { flex: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.12s;
}
.nav-links a:hover  { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 600; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.12s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #2a2a2a; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: #9ca3af; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.footer-logo {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.12s;
}
.footer-links a:hover { color: var(--text); }

.footer-feedback-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.12s;
}
.footer-feedback-btn:hover { color: var(--text); }

/* ── Tabbed pickers (OS / AI client) ── */
.aic-picker { margin: 1.25rem 0; }
.aic-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.aic-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 7px;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.aic-tab:hover { color: var(--text); }
.aic-tab[aria-selected="true"] {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.aic-tab svg { width: 15px; height: 15px; flex-shrink: 0; }
.aic-panels { margin-top: 1.1rem; }
.aic-panel { display: none; }
.aic-panel[data-active="true"] { display: block; }
.aic-panel > :first-child { margin-top: 0; }

/* ── Command row + generic copy button ── */
.aic-cmd-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--term-bg);
  border: 1px solid var(--term-border);
  border-radius: 9px;
  padding: 0.75rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--term-text);
  overflow-x: auto;
}
.aic-cmd-row .aic-prompt { color: var(--term-green); flex-shrink: 0; }
.aic-cmd-row .aic-cmd {
  white-space: pre;
  color: var(--term-text);
  flex: 1;
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
.aic-copy {
  background: none;
  border: none;
  color: var(--term-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
  line-height: 0;
  flex-shrink: 0;
  transition: color 0.12s;
}
.aic-copy:hover { color: var(--term-text); }
.aic-copy .ic-check { display: none; }
.aic-copy.aic-copied .ic-copy { display: none; }
.aic-copy.aic-copied .ic-check { display: block; }

/* ── Download button ── */
.aic-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--text);
  color: #fff;
  transition: background 0.12s;
}
.aic-dl-btn:hover { background: #2a2a2a; }
.aic-dl-btn svg { flex-shrink: 0; }
.aic-dl-note { margin-top: 0.7rem; font-size: 0.8rem; color: var(--subtle); }
.aic-dl-note a { color: var(--muted); }

/* ── Dark-context overrides (home page install-section) ── */
.install-section .aic-picker { text-align: center; }
.install-section .aic-tabs { background: #161b22; border-color: var(--term-border); }
.install-section .aic-tab { color: var(--term-muted); }
.install-section .aic-tab:hover { color: var(--term-text); }
.install-section .aic-tab[aria-selected="true"] {
  background: #0d1117;
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--term-border);
}
.install-section .aic-cmd-row { display: inline-flex; max-width: 100%; text-align: left; }
.install-section .aic-dl-btn { background: #fff; color: #111; }
.install-section .aic-dl-btn:hover { background: #e5e7eb; }
.install-section .aic-dl-note { color: var(--term-muted); }
.install-section .aic-dl-note a { color: var(--term-blue); }

/* ── Shared mobile ── */
@media (max-width: 720px) {
  nav { padding: 0 1.25rem; }
  .aic-tabs { display: flex; width: 100%; }
  .aic-tab { flex: 1; justify-content: center; }
}
