/*
Theme Name: Hastika Documentation
Theme URI: https://hastika.com
Description: A modern, compact documentation theme for Hastika products with AJAX navigation, dark mode, and product-specific organization. Built exclusively with WordPress native technologies for fast, accessible documentation.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Author: Hastika
Author URI: https://hastika.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hastika-docs
Tags: documentation, custom-post-type, ajax, dark-mode, responsive
*/

/* ========================================
   CSS Variables - Light Mode
   ======================================== */
:root {
  /* Colors */
  --color-primary: #6366f1;
  --color-background: #ffffff;
  --color-surface: #f9fafb;
  --color-border: #e5e7eb;
  --color-text: #1f2937;
  --color-text-secondary: #6b7280;
  --color-text-tertiary: #9ca3af;
  --color-hover: #f3f4f6;
  --color-active: #e0e7ff;
  --color-code-bg: #f3f4f6;
  --color-shadow: rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-body: 13px;
  --font-sidebar: 12px;
  --font-metadata: 11px;
  --font-h1: 24px;
  --font-h2: 18px;
  --font-h3: 15px;
  --font-code: 12px;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  
  /* Border Radius */
  --radius-sm: 5px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* Layout */
  --header-height: 56px;
  --sidebar-width: 260px;
  --toc-width: 220px;
  --max-content-width: 1400px;
  
  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 180ms ease;
}

/* ========================================
   Dark Mode Variables
   ======================================== */
[data-theme="dark"] {
  --color-primary: #818cf8;
  --color-background: #111827;
  --color-surface: #1f2937;
  --color-border: #374151;
  --color-text: #f9fafb;
  --color-text-secondary: #d1d5db;
  --color-text-tertiary: #9ca3af;
  --color-hover: #374151;
  --color-active: #312e81;
  --color-code-bg: #1f2937;
  --color-shadow: rgba(0, 0, 0, 0.3);
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  transition: background-color var(--transition-base), color var(--transition-base);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: var(--font-code);
  background-color: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

pre {
  background-color: var(--color-code-bg);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

pre code {
  background: none;
  padding: 0;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

h1 { font-size: var(--font-h1); margin-top: var(--space-2xl); }
h2 { font-size: var(--font-h2); margin-top: var(--space-xl); }
h3 { font-size: var(--font-h3); margin-top: var(--space-lg); }

p {
  margin-bottom: var(--space-lg);
}

ul, ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

li {
  margin-bottom: var(--space-xs);
}

/* ========================================
   Loading Indicator
   ======================================== */
.hdocs-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
  z-index: 9999;
  opacity: 0;
}

.hdocs-loading-bar.active {
  opacity: 1;
  animation: loading 1s ease-in-out;
}

@keyframes loading {
  0% { transform: scaleX(0); }
  50% { transform: scaleX(0.7); }
  100% { transform: scaleX(1); }
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
