/**
 * Custom Styles for Smart Expense Visualizer
 * Supplementary to Tailwind CSS
 */

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color;
    transition-timing-function: ease;
}

/* Remove default input number spinner */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Animation for error message */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#errorMessage {
    animation: slideIn 0.3s ease;
}

/* Focus states */
input:focus,
select:focus,
button:focus {
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

/* Scrollable table container for transactions */
.table-scroll {
    max-height: 360px; /* adjust as needed */
    overflow: auto;
}

/* Sticky table header inside scrollable container */
.table-scroll table thead th {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    z-index: 10;
}

.dark .table-scroll table thead th {
    background: rgba(17,24,39,0.95);
}
