/**
 * Custom Styles for Energy Service Dashboard
 * Most styling is handled by Tailwind CSS (CDN)
 */

/* Smooth transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading spinner (optional - can be added later) */
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3b82f6;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Fade in animation for page transitions */
.page {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Table row hover effect */
table tbody tr {
    transition: background-color 0.15s ease;
}

/* Chart container aspect ratio */
canvas {
    max-height: 300px;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }

    .stat-card .text-3xl {
        font-size: 1.875rem;
    }

    table {
        font-size: 0.875rem;
    }
}

/* Transaction type badges */
.transaction-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Skeleton loaders */
.skeleton-box {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Skeleton loaders on colored backgrounds (stat cards) */
.stat-card .skeleton-box {
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
}

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

/* Print styles */
@media print {
    nav,
    button,
    .no-print {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}
