/* Custom styles for Friendly Invoice */

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

/* Custom scrollbar - thinner and subtler */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Table interactions */
table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

/* Context menu animation */
#context-menu {
    animation: fadeIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

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

/* Modern Card Hover */
.card-hover {
    transition: all 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Button ripple effect */
button, .btn {
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Hardware accel */
}

/* Input Focus Ring Customization (if needed beyond Tailwind) */
input:focus, select:focus, textarea:focus {
    outline: none;
    /* Tailwind 'ring' classes handle the visual ring */
}

/* Print styles */
@media print {
    .sidebar, nav, .no-print {
        display: none !important;
    }
    
    .pl-64 {
        padding-left: 0 !important;
    }
    
    body {
        background-color: white;
    }
}

/* Responsive updates */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }
}

/* Base resets */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar Links */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280; /* gray-500 */
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid transparent;
}

.sidebar-link:hover {
    background-color: #f9fafb; /* gray-50 */
    color: #111827; /* gray-900 */
}

.sidebar-link.active {
    background-color: #eff6ff; /* blue-50 */
    color: #2563eb; /* blue-600 */
    border-color: #dbeafe; /* blue-100 */
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: color 0.2s;
}
