/* v2 - Dark mode support added */
/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Language-specific fonts */
html[lang="en"],
html[lang="es"],
html[lang="pt"],
html[lang="de"],
html[lang="fr"] {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html[lang="ko"] {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

html[lang="ja"] {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html[lang="zh"] {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
  font-family: inherit;
}

/* Hide scrollbar for horizontal scroll tabs */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* ==========================================================================
   Dark Mode Styles
   ========================================================================== */

/* Background colors */
html.dark,
html.dark body {
  background-color: #111827 !important; /* gray-900 */
}

.dark .bg-gray-50 {
  background-color: #111827 !important; /* gray-900 */
}

.dark .bg-white {
  background-color: #1f2937 !important; /* gray-800 */
}

.dark .bg-gray-100 {
  background-color: #374151 !important; /* gray-700 */
}

/* Text colors */
.dark .text-gray-900 {
  color: #ffffff !important;
}

.dark .text-gray-800,
.dark .text-gray-700 {
  color: #f3f4f6 !important; /* gray-100 */
}

.dark .text-gray-600 {
  color: #9ca3af !important; /* gray-400 */
}

.dark .text-gray-500 {
  color: #9ca3af !important; /* gray-400 */
}

/* Border colors */
.dark .border-gray-200,
.dark .border-gray-100 {
  border-color: #374151 !important; /* gray-700 */
}

.dark .border-gray-300 {
  border-color: #4b5563 !important; /* gray-600 */
}

/* Form elements */
.dark input,
.dark textarea,
.dark select {
  background-color: #374151 !important; /* gray-700 */
  border-color: #4b5563 !important; /* gray-600 */
  color: #ffffff !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: #9ca3af !important; /* gray-400 */
}

/* Dividers */
.dark .divide-gray-200 > :not(:last-child),
.dark .divide-gray-100 > :not(:last-child) {
  border-color: #374151 !important; /* gray-700 */
}

/* Cards and panels */
.dark .shadow-md,
.dark .shadow-lg,
.dark .shadow-xl {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2) !important;
}

/* Links in dark mode */
.dark a:not(.bg-blue-500):not(.bg-blue-600):not(.bg-gray-900):not([class*="text-"]) {
  color: #93c5fd; /* blue-300 */
}

/* Placeholder text */
.dark ::placeholder {
  color: #6b7280 !important; /* gray-500 */
}

/* ==========================================================================
   Feature Pills Carousel (Mobile)
   ========================================================================== */

/* Mobile: show only one pill at a time with fade animation */
@media (max-width: 767px) {
  .feature-pills-container {
    position: relative;
    height: 36px;
    overflow: hidden;
  }

  .feature-pills-track {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .feature-pill {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: featurePillFade 9s ease-in-out infinite;
    white-space: nowrap;
  }

  .feature-pill:nth-child(1) {
    animation-delay: 0s;
  }

  .feature-pill:nth-child(2) {
    animation-delay: 3s;
  }

  .feature-pill:nth-child(3) {
    animation-delay: 6s;
  }

  @keyframes featurePillFade {
    0%, 25% {
      opacity: 0;
      transform: translateX(-50%) translateY(5px);
    }
    8%, 25% {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    33%, 100% {
      opacity: 0;
      transform: translateX(-50%) translateY(-5px);
    }
  }
}

/* Desktop: show all pills normally */
@media (min-width: 768px) {
  .feature-pills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .feature-pill {
    opacity: 1 !important;
    position: relative !important;
    transform: none !important;
    animation: none !important;
    left: auto !important;
  }
}
