/* ==========================================================================
   Collect UI — consolidated styles
   Shared by index.html (gallery) and single.html (post).
   ========================================================================== */

/* ---------- Base typography ---------- */
html,
body {
  font-family:
    "Geist",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #fff;
  color: #1f1f1f;
}
.font-geist {
  font-family: "Geist", sans-serif;
}
.font-mono {
  font-family: "Geist Mono", ui-monospace, monospace;
}
.font-serif {
  font-family: "Fraunces", Georgia, serif;
}

/* ---------- Sidebar scrollbar ---------- */
.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: #1f1f1f transparent;
}
.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #1f1f1f;
  border-radius: 3px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: #000;
}

/* ---------- Gallery card palettes (index.html) ---------- */
.p-signup {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.p-calc {
  background: #1a1a2e;
}
.p-music {
  background: linear-gradient(160deg, #fa709a, #fee140);
}
.p-weather {
  background: linear-gradient(180deg, #4facfe, #00f2fe);
}
.p-checkout {
  background: #fff5e6;
}
.p-profile {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}
.p-settings {
  background: #f4f4f5;
}
.p-message {
  background: linear-gradient(135deg, #a8edea, #fed6e3);
}
.p-search {
  background: #ffffff;
}
.p-error {
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}
.p-pricing {
  background: #0a0a0a;
}
.p-onboarding {
  background: linear-gradient(135deg, #fbc2eb, #a6c1ee);
}
.p-statistic {
  background: #fef9c3;
}
.p-flash {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}
.p-leaderboard {
  background: #0f172a;
}
.p-podcast {
  background: linear-gradient(135deg, #30cfd0, #330867);
}
.p-recipe {
  background: #fff7ed;
}
.p-event {
  background: linear-gradient(135deg, #84fab0, #8fd3f4);
}
.p-crypto {
  background: #111827;
}
.p-realestate {
  background: #f5f5f4;
}
.p-fitness {
  background: linear-gradient(135deg, #ee9ca7, #ffdde1);
}
.p-travel {
  background: linear-gradient(180deg, #fdfcfb, #e2d1c3);
}
.p-banking {
  background: #064e3b;
}
.p-todo {
  background: #fffbe6;
}

/* ---------- Related-post palettes (single.html) ---------- */
.p-grid {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.p-mono {
  background: #1a1a2e;
}
.p-warm {
  background: linear-gradient(160deg, #fa709a, #fee140);
}
.p-mint {
  background: linear-gradient(135deg, #a8edea, #fed6e3);
}

/* ---------- Article prose (single.html) ---------- */
.prose p {
  margin-top: 1.1em;
  margin-bottom: 1.1em;
  line-height: 1.75;
  color: #2a2a2a;
  font-size: 17px;
}
.prose h2 {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.9rem;
  margin-top: 2.4em;
  margin-bottom: 0.6em;
  letter-spacing: -0.02em;
}
.prose h3 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.35rem;
  margin-top: 2em;
  margin-bottom: 0.5em;
  letter-spacing: -0.01em;
}
.prose ul {
  margin-top: 1em;
  margin-bottom: 1em;
  padding-left: 1.5em;
}
.prose ul li {
  list-style: disc;
  margin-bottom: 0.5em;
  line-height: 1.7;
  color: #2a2a2a;
}
.prose blockquote {
  border-left: 3px solid #1f1f1f;
  padding-left: 1.25em;
  margin: 1.8em 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.55;
  color: #1f1f1f;
}
.prose code {
  background: #f4f4f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Geist Mono", monospace;
  font-size: 0.92em;
}
.prose pre {
  background: #0f0f12;
  color: #e4e4e7;
  padding: 1.25em 1.5em;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-family: "Geist Mono", monospace;
  font-size: 0.88em;
  line-height: 1.6;
}
.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.prose a {
  color: #1f1f1f;
  text-decoration: underline;
  text-decoration-color: #d4d4d8;
  text-underline-offset: 3px;
}
.prose a:hover {
  text-decoration-color: #1f1f1f;
}
.prose figure {
  margin: 2em 0;
}
.prose figcaption {
  font-size: 13px;
  color: #71717b;
  margin-top: 0.5em;
  text-align: center;
}

/* ---------- Content buttons (for [button] shortcode) ----------
   Use inside post content. Pair `.btn` with a style and (optional) size.
   Specificity bumped via `.prose .btn` to override prose-anchor styling. */
.btn,
.prose .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: "Geist", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.05s ease;
}
.prose .btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: translateY(0.5px);
}

/* Sizes */
.btn-sm,
.prose .btn-sm {
  height: 28px;
  padding: 0 0.75rem;
  font-size: 11px;
  border-radius: 8px;
}
.btn-lg,
.prose .btn-lg {
  height: 44px;
  padding: 0 1.25rem;
  font-size: 14px;
  border-radius: 12px;
}

/* Variants */
.btn-primary,
.prose .btn-primary {
  background: #1f1f1f;
  color: #fff;
  border-color: #1f1f1f;
}
.btn-primary:hover,
.prose .btn-primary:hover {
  background: #2f2f2f;
  border-color: #2f2f2f;
  color: #fff;
}

.btn-secondary,
.prose .btn-secondary {
  background: #fff;
  color: #1f1f1f;
  border-color: #eaeaea;
}
.btn-secondary:hover,
.prose .btn-secondary:hover {
  background: #f5f6f8;
  border-color: #d4d4d8;
  color: #1f1f1f;
}

.btn-ghost,
.prose .btn-ghost {
  background: transparent;
  color: #464646;
  border-color: transparent;
}
.btn-ghost:hover,
.prose .btn-ghost:hover {
  background: #f5f6f8;
  color: #1f1f1f;
}

.btn-accent,
.prose .btn-accent {
  background: #ff5959;
  color: #fff;
  border-color: #ff5959;
}
.btn-accent:hover,
.prose .btn-accent:hover {
  background: #ff3f3f;
  border-color: #ff3f3f;
  color: #fff;
}

.btn-outline,
.prose .btn-outline {
  background: transparent;
  color: #1f1f1f;
  border-color: #1f1f1f;
}
.btn-outline:hover,
.prose .btn-outline:hover {
  background: #1f1f1f;
  color: #fff;
}

/* ---------- Sidebar category rows ---------- */
.sb-cat-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  color: #5c5c5c;
  transition: background-color 0.15s ease;
}
.sb-cat-row:hover {
  background: #f9fafb;
}
.sb-cat-icon {
  display: inline-block;
  width: 14px;
  text-align: center;
  color: inherit;
  font-size: 11px;
}

/* ---------- macOS-style code window ---------- */
.code-window {
  margin: 1.75em 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0f0f12;
  border: 1px solid #1f1f24;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.35);
}
.code-window-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 36px;
  padding: 0 0.875rem;
  background: linear-gradient(180deg, #2a2a31 0%, #232328 100%);
  border-bottom: 1px solid #000;
}
.code-window-header .traffic-lights {
  display: inline-flex;
  gap: 6px;
}
.code-window-header .traffic-lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25);
}
.code-window-header .tl-red {
  background: #ff5f57;
}
.code-window-header .tl-yellow {
  background: #febc2e;
}
.code-window-header .tl-green {
  background: #28c840;
}
.code-window-header .code-window-title {
  flex: 1;
  text-align: center;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  color: #a1a1aa;
  letter-spacing: -0.01em;
}
.code-window-header .code-window-title::before {
  content: "";
  display: inline-block;
  width: 54px; /* visual balance opposite the 3 traffic-light dots */
}
.code-window .code-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #d4d4d8;
  font-size: 11px;
  font-family: "Geist", sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.code-window .code-copy:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* override .prose pre styles when nested inside .code-window */
.prose .code-window pre {
  margin: 0;
  border-radius: 0;
  background: transparent;
  padding: 1.1em 1.25em;
  font-size: 0.88em;
  line-height: 1.65;
}

.code-window-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 0.875rem;
  background: #18181c;
  border-top: 1px solid #000;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #a1a1aa;
}
.code-window-status .status-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e4e4e7;
}
.code-window-status .status-lang i {
  color: #f7df1e;
} /* JS yellow */
.code-window-status .status-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.code-window-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28c840;
}

/* ---------- Interactions (shared) ---------- */
input.fav:checked + label svg path {
  fill: #ff5959;
}
.reaction-btn:hover {
  background: #f5f6f8;
}
