/* Custom CSS for Pacers App Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #EF4444;
    border-radius: 5px;
}

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

/* Print styles */
@media print {
    header, footer {
        display: none;
    }
}

/* Additional utility classes */
.text-balance {
    text-wrap: balance;
}

/* Form input focus styles */
input:focus, textarea:focus, select:focus {
    border-color: #EF4444;
    ring-color: #EF4444;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Unified language selector styling */
.lang-select {
    min-width: 100px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem; /* text-sm */
    background-color: #f3f4f6; /* gray-100 */
    color: #374151; /* gray-700 */
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.5rem; /* rounded-md */
    appearance: none;
    line-height: 1.25rem;
}
.lang-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(219,0,0,0.35);
    border-color: #db0000;
}
.lang-select option {
    background-color: #ffffff;
    color: #111827; /* gray-900 */
}

:root {
    color-scheme: light;
}
.dark, .dark body {
    color-scheme: dark;
}

/* Ensure common form controls adopt dark system widgets where supported */
.dark select,
.dark input,
.dark textarea,
.dark button {
    color-scheme: dark;
}

/* Improve closed select control contrast in dark mode (tailwind classes cover most,
   but this ensures consistency across browsers) */
.dark select {
    background-color: #1f2937; /* gray-800 */
    color: #e5e7eb;            /* gray-200 */
    border-color: #4b5563;     /* gray-600 */
}

/* When browsers allow styling of list items, keep dark popup readable */
.dark select option {
    background-color: #111827; /* gray-900 */
    color: #e5e7eb;            /* gray-200 */
}

/* Light mode fallback for generic selects (non .lang-select) */
select option {
    background-color: #ffffff;
    color: #111827; /* gray-900 */
}
