/* ColorSnap Docs — shadcn-style design system (site chrome only) */

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--cs-background);
  color: var(--cs-text);
}

.page-content { padding-top: 56px; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 56px;
  background: color-mix(in srgb, var(--cs-surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cs-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.logo {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  white-space: nowrap;
}
.nav-breadcrumb {
  font-size: 13px;
  color: var(--cs-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-breadcrumb::before {
  content: '/';
  margin: 0 8px;
  opacity: 0.4;
}
.nav-link {
  font-size: 14px;
  color: var(--cs-text-muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-link:hover { color: var(--cs-text); }
.nav-link.active {
  color: var(--cs-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Buttons (docs chrome) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary { background: #7c3aed; color: #fff; }
.btn-primary:hover { background: #6d28d9; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--cs-border);
  color: var(--cs-text-muted);
}
.btn-secondary:hover {
  color: var(--cs-text);
  background: rgba(255, 255, 255, 0.04);
}
.btn-ghost {
  background: transparent;
  color: var(--cs-text-muted);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cs-text);
}

/* ── Dropdown ── */
.dropdown { position: relative; }
.nav-more-wrap { position: relative; }
.dropdown-menu,
.nav-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--cs-surface);
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 4px;
  z-index: 1000;
}
.dropdown-menu[hidden],
.nav-more-menu[hidden] { display: none; }
.dropdown-label,
.nav-more-label {
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cs-text-muted);
  opacity: 0.7;
}
.dropdown-item,
.nav-more-menu a {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--cs-text-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.1s;
}
.dropdown-item:hover,
.nav-more-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cs-text);
}
.dropdown-divider {
  height: 1px;
  background: var(--cs-border);
  margin: 4px 0;
}

/* ── Cards ── */
.card {
  background: var(--cs-surface);
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  padding: 20px;
}
.card-hover:hover { border-color: rgba(124, 58, 237, 0.4); }
.card-lift {
  transition: border-color 0.15s, transform 0.15s;
}
.card-lift:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-2px);
}

/* ── Code blocks ── */
.code-block {
  background: var(--cs-surface);
  border: 1px solid var(--cs-border);
  border-radius: 6px;
  padding: 16px;
  font-family: 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
  white-space: pre-wrap;
  text-align: left;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid var(--cs-border);
  background: var(--cs-surface);
  color: var(--cs-text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.copy-btn:hover {
  color: var(--cs-text);
  background: rgba(255, 255, 255, 0.06);
}
.copy-btn.copied { color: #22c55e; border-color: rgba(34, 197, 94, 0.3); }

/* ── Inputs ── */
.input {
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid var(--cs-border);
  background: var(--cs-background);
  color: var(--cs-text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.input::placeholder { color: var(--cs-text-muted); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
}
.badge-default { background: rgba(255,255,255,0.08); color: var(--cs-text-muted); border: 1px solid var(--cs-border); }
.badge-primary { background: rgba(124,58,237,0.15); color: #a78bfa; border: 1px solid rgba(124,58,237,0.3); }
.badge-success { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.badge-warning { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.badge-danger { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-info { background: rgba(14,165,233,0.12); color: #38bdf8; border: 1px solid rgba(14,165,233,0.25); }

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cs-text-muted);
  border-bottom: 1px solid var(--cs-border);
  padding: 10px 16px;
  text-align: left;
  font-weight: 500;
}
.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--cs-border);
}
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  background: var(--cs-surface);
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-lg { max-width: 800px; }
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--cs-border);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body { padding: 20px; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--cs-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Hero (shared) ── */
.page-hero {
  padding: 80px 24px 48px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
}
.page-hero-sub {
  font-size: 15px;
  color: var(--cs-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}
.hero-badge-sm {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  background: rgba(124, 58, 237, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.25);
  margin-bottom: 16px;
}

/* ── Footer ── */
.site-footer,
footer.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--cs-border);
  background: var(--cs-surface);
  color: var(--cs-text-muted);
  text-align: left;
}

.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.site-footer-top {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--cs-border);
}

.site-footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.site-footer-logo {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.site-footer-tagline {
  font-size: 13px;
  line-height: 1.6;
  color: var(--cs-text-muted);
  max-width: 240px;
}

.site-footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 32px;
}

.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.site-footer-label,
.site-footer-col-label {
  padding-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cs-text-muted);
  opacity: 0.7;
}

.site-footer-col a,
.footer-link,
.site-footer-row a {
  font-size: 13px;
  color: var(--cs-text-muted);
  text-decoration: none;
  transition: color 0.15s;
  line-height: 1.5;
}

.site-footer-col a:hover,
.footer-link:hover,
.site-footer-row a:hover {
  color: var(--cs-text);
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
}

.site-footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer-legal a {
  font-size: 12px;
  color: var(--cs-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer-legal a:hover { color: var(--cs-text); }

.footer-copy,
.site-footer-copy {
  font-size: 12px;
  color: var(--cs-text-muted);
  opacity: 0.7;
}

/* Legacy row layout (fallback) */
.site-footer-brand {
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 15px;
  background: linear-gradient(135deg, #7c3aed, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-links,
.site-footer-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .site-footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .site-footer-inner { padding: 36px 20px 20px; }

  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Tabs (underline style) ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--cs-border);
  margin-bottom: 16px;
}
.tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--cs-text); }
.tab.active {
  color: var(--cs-text);
  border-bottom-color: #7c3aed;
}

@media (max-width: 768px) {
  .nav-right { gap: 10px; }
  .nav-link.hide-mobile { display: none; }
}

/* ── Content pages ── */
.page-main { padding: 72px 24px 60px; max-width: 960px; margin: 0 auto; }
.page-header { text-align: center; margin-bottom: 40px; }
.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 10px;
}
.page-header p {
  color: var(--cs-text-muted);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}
