/* AgroClimate Africa API - Custom Styles */

/* Smooth transitions */
* {
    transition: all 0.2s ease-in-out;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Code blocks */
pre {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
}

/* Button hover effects */
button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Card hover effects */
.hover\:shadow-xl:hover {
    transform: translateY(-4px);
}

/* Gradient background animation */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

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

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

/* Response code syntax highlighting */
#response {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* Link hover effect */
a {
    position: relative;
}

a:not(.button)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

a:not(.button):hover::after {
    width: 100%;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Mobile navigation */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    nav .space-x-6 {
        display: flex;
        flex-direction: column;
        space-y: 2;
    }
}

/* Print styles */
@media print {
    nav, footer, #playground {
        display: none;
    }
}

/* Focus styles for accessibility */
input:focus,
select:focus,
button:focus {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* Error message styling */
#errorDiv {
    animation: fadeIn 0.3s ease-out;
}

/* Success response styling */
#responseDiv {
    animation: fadeIn 0.3s ease-out;
}

/* Custom border for code blocks */
.border-l-4 {
    border-left-width: 4px;
}
