@import "tailwindcss";

/* Global responsive styles */
* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Ensure smooth scrolling and better mobile experience */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Responsive typography */
@media (max-width: 640px) {
  html {
    font-size: 14px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  html {
    font-size: 15px;
  }
}

@media (min-width: 1025px) {
  html {
    font-size: 16px;
  }
}

/* Touch-friendly interactive elements */
@media (max-width: 1024px) {
  button,
  [role="button"],
  input[type="submit"],
  input[type="button"],
  input[type="reset"] {
    min-height: 44px;
    min-width: 44px;
  }

  /* Ensure clickable areas are touch-friendly */
  .touch-manipulation {
    touch-action: manipulation;
  }
}

/* Improve form inputs on mobile */
input,
textarea,
select {
  font-size: 16px; /* Prevents zoom on iOS */
}

@media (min-width: 641px) {
  input,
  textarea,
  select {
    font-size: inherit;
  }
}

/* Scrollbar styling for better UX */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Focus styles for accessibility */
*:focus {
  outline-offset: 2px;
}

/* Utility classes for responsive design */
.responsive-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .responsive-container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .responsive-container {
    padding: 0 3rem;
  }
}

/* Responsive text utilities */
.text-responsive-sm {
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .text-responsive-sm {
    font-size: 1rem;
  }
}

.text-responsive-base {
  font-size: 1rem;
}

@media (min-width: 640px) {
  .text-responsive-base {
    font-size: 1.125rem;
  }
}

.text-responsive-lg {
  font-size: 1.125rem;
}

@media (min-width: 640px) {
  .text-responsive-lg {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .text-responsive-lg {
    font-size: 1.5rem;
  }
}

/* Animation performance optimization */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom dark mode table colors */
.bg-gray-750 {
  background-color: rgb(55 65 81); /* Custom gray between 700 and 800 */
}

/* Custom border width for tooltip arrows */
.border-3 {
  border-width: 3px;
}

/* Hide scrollbar utility class */
.scrollbar-hide {
  -ms-overflow-style: none; /* Internet Explorer 10+ */
  scrollbar-width: none; /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}
