/* HelpScout Custom Styles - Espa */
/* Generated to match Next.js app styling */

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

/* ===================================
   CSS CUSTOM PROPERTIES - LIGHT MODE
   =================================== */
:root {
  /* Border Radius */
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  /* Colors - Light Mode */
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);

  /* Chart Colors */
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
}

/* ===================================
   CSS CUSTOM PROPERTIES - DARK MODE
   =================================== */
.dark,
[data-theme="dark"] {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);

  /* Chart Colors - Dark Mode */
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
}

/* ===================================
   BASE STYLES
   =================================== */
* {
  border-color: var(--border);
  outline-color: var(--ring);
}

html,
body {
  font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f7f7f7;
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dark body,
[data-theme="dark"] body {
  background-color: var(--background);
}

::selection {
  background-color: #7CB9D3;
  color: white;
}

a {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

button {
  cursor: pointer;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1 {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  color: #18181b;
  margin-top: 0;
  margin-bottom: 0.875rem;
}

.dark h1,
[data-theme="dark"] h1 {
  color: var(--foreground);
}

h2 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  color: #18181b;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.dark h2,
[data-theme="dark"] h2 {
  color: var(--foreground);
}

h3 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: #27272a;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.dark h3,
[data-theme="dark"] h3 {
  color: var(--foreground);
}

h4 {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: #27272a;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.dark h4,
[data-theme="dark"] h4 {
  color: var(--foreground);
}

h5 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  color: #27272a;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.dark h5,
[data-theme="dark"] h5 {
  color: var(--foreground);
}

h6 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: #27272a;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.dark h6,
[data-theme="dark"] h6 {
  color: var(--foreground);
}

p {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  color: #52525b;
}

.dark p,
[data-theme="dark"] p {
  color: var(--muted-foreground);
}

strong,
b {
  font-weight: 600;
  color: #18181b;
}

.dark strong,
.dark b,
[data-theme="dark"] strong,
[data-theme="dark"] b {
  color: var(--foreground);
}

em,
i {
  font-style: italic;
}

/* ===================================
   BLOCKQUOTES
   =================================== */
blockquote {
  font-style: italic;
  border-left: 4px solid #d4d4d8;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #52525b;
}

.dark blockquote,
[data-theme="dark"] blockquote {
  border-left-color: var(--border);
  color: var(--muted-foreground);
}

/* ===================================
   LISTS
   =================================== */
ul,
ol {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

li {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* ===================================
   CODE BLOCKS
   =================================== */
code {
  background-color: #f4f4f5;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-weight: 500;
  color: #18181b;
  font-family: 'Courier New', Courier, monospace;
}

.dark code,
[data-theme="dark"] code {
  background-color: var(--muted);
  color: var(--foreground);
}

pre {
  background-color: #27272a;
  color: #fafafa;
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.dark pre,
[data-theme="dark"] pre {
  background-color: var(--card);
}

pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}

/* ===================================
   TABLES
   =================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th,
td {
  border: 1px solid #d4d4d8;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.dark th,
.dark td,
[data-theme="dark"] th,
[data-theme="dark"] td {
  border-color: var(--border);
}

th {
  background-color: #f4f4f5;
  font-weight: 600;
  color: #18181b;
}

.dark th,
[data-theme="dark"] th {
  background-color: var(--muted);
  color: var(--foreground);
}

tr:nth-child(even) {
  background-color: #fafafa;
}

.dark tr:nth-child(even),
[data-theme="dark"] tr:nth-child(even) {
  background-color: var(--muted);
}

/* ===================================
   HORIZONTAL RULE
   =================================== */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ===================================
   IMAGES
   =================================== */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-muted {
  color: var(--muted-foreground);
}

.text-primary {
  color: var(--primary);
}

.text-destructive {
  color: var(--destructive);
}

.bg-card {
  background-color: var(--card);
}

.bg-muted {
  background-color: var(--muted);
}

.border-radius {
  border-radius: var(--radius);
}

.border-radius-sm {
  border-radius: var(--radius-sm);
}

.border-radius-lg {
  border-radius: var(--radius-lg);
}

/* ===================================
   HELPSCOUT SPECIFIC ELEMENTS
   =================================== */
#searchBar .search-query {
  border-radius: 9999px;
}

#searchBar button {
  border-top-right-radius: 9999px;
  border-bottom-right-radius: 9999px;
}

#docsSearch h1 {
  font-weight: bold;
}

.category-list .category {
  background-color: white;
  border-radius: var(--radius-lg);
  border: none;
}
