@import "tailwindcss";

@theme {
  --font-family-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --color-background: #F5F7FA;
  --color-foreground: #1C1C1C;
  --color-primary: #0F2A44;
  --color-primary-light: #1a3a5c;
  --color-accent: #F2B705;
  --color-secondary: #2E2E2E;
}

@layer base {
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }

  *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
  }

  body {
    font-family: var(--font-family-sans);
    background-color: var(--color-background);
    color: var(--color-foreground);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  /* Selection */
  ::selection {
    background: #0F2A44;
    color: white;
  }

  /* Focus styles for accessibility */
  :focus-visible {
    outline: 2px solid #0F2A44;
    outline-offset: 2px;
  }

  /* Hide caret everywhere except inputs */
  * {
    caret-color: transparent !important;
  }

  /* Ensure caret is visible ONLY in actual input elements */
  input,
  input:focus,
  textarea,
  textarea:focus,
  select,
  select:focus,
  [contenteditable="true"],
  [contenteditable="true"]:focus {
    caret-color: #1C1C1C !important;
  }

  /* Disable text selection on all interactive/non-text elements */
  button,
  a,
  [role="button"],
  tr,
  th,
  td,
  label,
  nav,
  aside,
  header,
  footer,
  div,
  span,
  p,
  h1, h2, h3, h4, h5, h6,
  li,
  ul,
  ol,
  section,
  article,
  main {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
  }

  /* Allow text selection in inputs and textareas */
  input,
  textarea,
  [contenteditable="true"],
  pre,
  code {
    user-select: text !important;
    -webkit-user-select: text !important;
  }
}

@layer utilities {
  /* Page Title Style */
  .page-title {
    @apply text-2xl font-bold text-gray-900 tracking-tight;
  }

  /* Simple fade in */
  .fade-in {
    animation: fadeIn 0.5s ease-out forwards;
  }
  
  /* Grid background pattern */
  .bg-grid {
    background-color: #F5F7FA;
    background-image: linear-gradient(to right, #0F2A4408 1px, transparent 1px),
                      linear-gradient(to bottom, #0F2A4408 1px, transparent 1px);
    background-size: 24px 24px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Smooth animations - reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
