/**
 * Additional custom styles for GrowCalculator
 */

/* Mutation button styles */
.mutation-btn {
    @apply px-3 py-2 text-sm font-medium border border-gray-300 rounded-lg transition-all duration-200 ease-in-out;
    @apply hover:border-purple-400 hover:shadow-sm;
    @apply focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50;
}

.mutation-btn.selected,
.mutation-btn.bg-purple-600 {
    @apply bg-purple-600 text-white border-purple-600;
    @apply hover:bg-purple-700 hover:border-purple-700;
}

/* Form input styles */
.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md;
    @apply focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent;
    @apply transition-all duration-200 ease-in-out;
}

.form-select {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md bg-white;
    @apply focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent;
    @apply transition-all duration-200 ease-in-out;
}

/* Select placeholder styling */
select option[disabled] {
    color: #9ca3af;
    font-style: italic;
}

select:invalid {
    color: #9ca3af;
}

/* Global scrollbar styles for the entire website */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1f2937; /* Dark blue-gray background */
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: #10b981; /* Vibrant green thumb */
    border-radius: 6px;
    border: 2px solid #1f2937; /* Dark border to match track */
    position: relative;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669; /* Slightly darker green on hover */
}

/* Add upward arrow to all scrollbar thumbs */
::-webkit-scrollbar-thumb::before {
    content: '▲';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    color: #34d399; /* Light green arrow */
    font-size: 8px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Firefox global scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #10b981 #1f2937; /* Green thumb, dark track */
}

/* Custom scrollbar (for specific elements that need it) */
.custom-scrollbar::-webkit-scrollbar {
    width: 12px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #1f2937; /* Dark blue-gray background */
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #10b981; /* Vibrant green thumb */
    border-radius: 6px;
    border: 2px solid #1f2937; /* Dark border to match track */
    position: relative;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #059669; /* Slightly darker green on hover */
}

/* Add upward arrow to scrollbar thumb */
.custom-scrollbar::-webkit-scrollbar-thumb::before {
    content: '▲';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    color: #34d399; /* Light green arrow */
    font-size: 8px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Firefox scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #10b981 #1f2937; /* Green thumb, dark track */
}

/* Loading animation */
.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Pulse animation for important elements */
.pulse-slow {
    animation: pulse-slow 2s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button variants */
.btn-primary {
    @apply bg-purple-600 text-white py-2 px-4 rounded-md font-medium;
    @apply hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50;
    @apply transition-all duration-200 ease-in-out;
}

.btn-secondary {
    @apply bg-gray-500 text-white py-2 px-4 rounded-md font-medium;
    @apply hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-opacity-50;
    @apply transition-all duration-200 ease-in-out;
}

.btn-success {
    @apply bg-green-500 text-white py-2 px-4 rounded-md font-medium;
    @apply hover:bg-green-600 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-opacity-50;
    @apply transition-all duration-200 ease-in-out;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .mobile-stack {
        @apply flex-col space-y-2 space-x-0;
    }
    
    .mobile-full {
        @apply w-full;
    }
    
    .mobile-text-center {
        @apply text-center;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode-bg {
        @apply bg-gray-900 text-white;
    }
    
    .dark-mode-card {
        @apply bg-gray-800 border-gray-700;
    }
    
    .dark-mode-input {
        @apply bg-gray-700 border-gray-600 text-white;
    }
}

/* Hero Section Optimizations */
.hero-section {
    position: relative;
    overflow: hidden;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Trust signal cards with enhanced hover effects */
.hero-section .bg-white\/10 {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-section .bg-white\/10:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Enhanced button hover effects */
.hero-section a {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-section a:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive text sizing and layout */
@media (max-width: 640px) {
    .hero-section {
        /* min-height: 40vh; */
        /* max-height: 40vh; */
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .hero-section .grid {
        gap: 0.75rem;
    }
    
    .hero-section .bg-white\/10 {
        padding: 0.75rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .hero-section {
        /* min-height: 45vh; */
        /* max-height: 45vh; */
    }
}

@media (min-width: 1025px) {
    .hero-section {
        /* min-height: 50vh; */
        /* max-height: 50vh; */
    }
}

/* Animation classes */
.fade-in {
    animation: fade-in 0.3s ease-in-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slide-up 0.3s ease-in-out;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom range slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #7c3aed;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-moz-range-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    background: #7c3aed;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tooltip styles */
.tooltip {
    @apply relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    @apply absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2;
    @apply bg-gray-900 text-white text-xs py-1 px-2 rounded;
    @apply opacity-0 pointer-events-none transition-opacity duration-200;
    white-space: nowrap;
}

.tooltip:hover::after {
    @apply opacity-100;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #7c3aed;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation menu active state */
.nav-link {
    @apply transition-colors duration-200;
}

.nav-link.active {
    @apply text-green-400 font-semibold;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 1px;
    animation: slideIn 0.3s ease-out;
}

/* Mobile navigation styles */
.mobile-nav-link {
    @apply transition-colors duration-200;
}

.mobile-nav-link.active {
    @apply text-green-400 font-semibold bg-gray-700;
}

/* Mobile menu button styles */
#mobile-menu-button {
    @apply transition-colors duration-200;
}

#mobile-menu-button:hover {
    @apply bg-gray-700;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    transform: translateY(-10px);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

/* Mobile menu button icon animation */
#mobile-menu-button svg {
    transition: transform 0.3s ease-in-out;
}

#mobile-menu-button[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}
