/* Base styles for Socrates App chat interface */
/* This file contains CSS variables, resets, and global styles */

/* CSS Variables */
:root {
  /* Colors - Based on Tailwind's gray color palette */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-transparent: transparent;

  /* Gray scale */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* Primary colors */
  --color-primary: #3b82f6; /* Blue-500 */
  --color-primary-50: #eff6ff; /* Blue-50 */
  --color-primary-100: #dbeafe; /* Blue-100 */
  --color-primary-200: #bfdbfe; /* Blue-200 */
  --color-primary-300: #93c5fd; /* Blue-300 */
  --color-primary-400: #60a5fa; /* Blue-400 */
  --color-primary-500: #3b82f6; /* Blue-500 */
  --color-primary-600: #2563eb; /* Blue-600 */
  --color-primary-700: #1d4ed8; /* Blue-700 */
  --color-primary-800: #1e40af; /* Blue-800 */
  --color-primary-900: #1e3a8a; /* Blue-900 */

  /* Spacing - Based on Tailwind's spacing scale */
  --space-0: 0;
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-8: 2rem; /* 32px */
  --space-9: 2.25rem; /* 36px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px */

  /* Typography */
  --font-sans:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;

  /* Borders and Radius */
  --border-width-0: 0px;
  --border-width-1: 1px;
  --border-width-2: 2px;

  --border-radius-none: 0;
  --border-radius-sm: 0.125rem; /* 2px */
  --border-radius-md: 0.375rem; /* 6px */
  --border-radius-lg: 0.5rem; /* 8px */
  --border-radius-xl: 0.75rem; /* 12px */
  --border-radius-2xl: 1rem; /* 16px */
  --border-radius-3xl: 1.5rem; /* 24px */
  --border-radius-full: 9999px; /* Fully rounded, like a circle */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

  /* Animation & Transition */
  --transition-fast: 150ms;
  --transition-normal: 200ms;
  --transition-slow: 300ms;
  --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Animation durations */
  --animation-fast: 150ms;
  --animation-normal: 200ms;
  --animation-slow: 300ms;

  /* Z-index */
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;

  /* Container Sizes */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --container-3xl: 48rem; /* 768px - Based on max-w-3xl */

  /* Custom component variables */
  --input-min-height: 24px;
  --input-max-height: 160px;
  --button-height: 2rem; /* h-8 */
  --button-width: 2rem; /* w-8 */
  --icon-size: 1rem; /* size-4 */
}

/* Reset & Normalize - A minimal reset based on modern browser defaults */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  -webkit-text-size-adjust: 100%; /* Prevent font size adjustment on orientation change */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-gray-900);
  background-color: var(--color-gray-50);
  overflow: hidden;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
[role="button"] {
  cursor: pointer;
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  outline: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Use attribute selector with higher specificity */
[class].hidden,
.hidden[class],
html .hidden,
body .hidden {
  display: none;
}

/* Focus styling for better accessibility */
:focus-visible {
  outline: 2px solid var(--color-gray-500);
  outline-offset: 2px;
}

/* Placeholder styling */
::placeholder {
  color: var(--color-gray-400);
}

/* Screen reader only class for accessibility */
.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;
}

/* Media Queries for Responsive Design */
@media (min-width: 640px) {
  /* Small screens and up */
}

@media (min-width: 768px) {
  /* Medium screens and up */
}

@media (min-width: 1024px) {
  /* Large screens and up */
}
