/**
 * Readmify - shadcn/ui Natural Theme Stylesheet
 * Based on the iconic Zinc / Neutral palette
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #121215;
  --card-foreground: #fafafa;
  --popover: #09090b;
  --popover-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --secondary: #1f1f23;
  --secondary-foreground: #fafafa;
  --muted: #1f1f23;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --accent-foreground: #fafafa;
  --destructive: #7f1d1d;
  --destructive-foreground: #fafafa;
  --border: #27272a;
  --input: #27272a;
  --ring: #d4d4d8;
  --radius: 0.5rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* shadcn Inputs & Textareas */
.form-input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  background-color: #121215;
  border: 1px solid #27272a;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  color: #fafafa;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus {
  outline: none;
  border-color: #71717a;
  box-shadow: 0 0 0 1px #71717a;
  background-color: #16161a;
}
.form-input::placeholder {
  color: #52525b;
}

/* shadcn Buttons */
.btn-primary {
  background-color: #fafafa;
  color: #09090b;
  font-weight: 500;
  padding: 0.45rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
  background-color: #e4e4e7;
}

.btn-secondary {
  background-color: #18181b;
  color: #fafafa;
  border: 1px solid #27272a;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn-secondary:hover {
  background-color: #27272a;
  border-color: #3f3f46;
}

.btn-ghost {
  background-color: transparent;
  color: #a1a1aa;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn-ghost:hover {
  background-color: #18181b;
  color: #fafafa;
}

/* shadcn Switch */
.shadcn-switch {
  position: relative;
  display: inline-flex;
  height: 1.25rem;
  width: 2.25rem;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 9999px;
  border: 2px solid transparent;
  transition: background-color 0.2s ease-in-out;
  background-color: #27272a;
}
.shadcn-switch.checked {
  background-color: #fafafa;
}
.shadcn-switch-thumb {
  pointer-events: none;
  display: inline-block;
  height: 1rem;
  width: 1rem;
  border-radius: 9999px;
  background-color: #71717a;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
  transform: translateX(0);
}
.shadcn-switch.checked .shadcn-switch-thumb {
  transform: translateX(1rem);
  background-color: #09090b;
}

/* Section Item in Sidebar */
.section-item {
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.section-item:hover {
  background-color: #18181b;
}
.section-item.active {
  background-color: #1f1f23;
  border-color: #3f3f46;
  color: #fafafa;
}

/* shadcn Card Container */
.shadcn-card {
  background-color: #121215;
  border: 1px solid #27272a;
  border-radius: 0.5rem;
}

/* Raw code viewer */
#raw-markdown-textarea {
  font-family: var(--font-mono);
  tab-size: 2;
  white-space: pre-wrap;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==================== INTERACTIVE CANVAS & LIVING DOCUMENT STYLES ==================== */
.interactive-section-block {
  position: relative;
  transition: all 0.15s ease;
}

.interactive-section-block:hover {
  background-color: rgba(24, 24, 27, 0.35);
}

.canvas-section-focused {
  border-color: #3f3f46 !important;
}

.section-hover-toolbar {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.canvas-editable-heading:focus,
.canvas-editable-text:focus {
  outline: none;
  box-shadow: 0 0 0 1px #52525b;
}

.canvas-document {
  max-width: 100%;
}

#slide-over-inspector {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

