/* Custom theme inspired by Stripe's documentation */

:root {
  /* Colors */
  --color-primary: #635bff;
  --color-secondary: #0a2540;
  --color-accent: #00d4ff;
  --color-success: #32d583;
  --color-warning: #ffd700;
  --color-danger: #ff4d4f;
  --color-text: #425466;
  --color-text-light: #697386;
  --color-heading: #0a2540;
  --color-background: #ffffff;
  --color-background-alt: #f6f9fc;
  --color-border: #e6ebf1;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', SFMono-Regular, Consolas, monospace;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  background: var(--color-background);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.4; }
h4 { font-size: 1.25rem; line-height: 1.4; }

p {
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
  line-height: 1.8;
}

/* Code Blocks */
pre, code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
}

pre {
  padding: var(--spacing-md);
  overflow-x: auto;
  border: 1px solid var(--color-border);
}

code {
  padding: var(--spacing-xs) var(--spacing-sm);
}

/* Navigation */
.nav-container {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-menu {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
}

/* Mega Menu */
.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xl);
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xl);
}

.nav-item:hover .mega-menu {
  display: grid;
}

/* Cards */
.card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s ease;
}

.button-primary {
  background: var(--color-primary);
  color: white;
}

.button-secondary {
  background: var(--color-background);
  border: 1px solid var(--color-border);
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 360px;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  padding: var(--spacing-md);
  overflow-y: auto;
  flex-grow: 1;
}

.chat-input {
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--spacing-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 1.5rem;
    --spacing-xxl: 2rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  .mega-menu {
    grid-template-columns: 1fr;
  }

  .chat-widget {
    width: 100%;
    bottom: 0;
    right: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}
