/* GBX2 Analytics Dashboard Styles */

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    border-top-color: #8B5CF6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Card hover effects */
.bg-gray-800 {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bg-gray-800:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Table styles */
table tbody tr {
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

table tbody tr:last-child {
    border-bottom: none;
}

table tbody tr:hover {
    background-color: rgba(75, 85, 99, 0.2);
}

/* Input focus states */
input:focus, select:focus {
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

/* Button states */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

/* Query suggestions */
#query-suggestions button {
    background-color: rgba(139, 92, 246, 0.2);
    color: #C4B5FD;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

#query-suggestions button:hover {
    background-color: rgba(139, 92, 246, 0.4);
    color: white;
}

/* Chart container */
.h-64 {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .text-3xl {
        font-size: 1.5rem;
    }

    main {
        padding: 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.8);
}

/* Stat change indicators */
.stat-up {
    color: #34D399;
}

.stat-down {
    color: #F87171;
}

.stat-neutral {
    color: #9CA3AF;
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, rgba(75, 85, 99, 0.3) 25%, rgba(75, 85, 99, 0.5) 50%, rgba(75, 85, 99, 0.3) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Error state */
.error-message {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 8px;
    padding: 1rem;
    color: #FCA5A5;
}

/* Success state */
.success-message {
    background-color: rgba(52, 211, 153, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.5);
    border-radius: 8px;
    padding: 1rem;
    color: #6EE7B7;
}
