/* Virtualized Data Grid Styles */

.virtualized-grid-container {
    width: 100%;
}

/* Grid Header */
.grid-header {
    background: var(--neutral-layer-2);
    border-bottom: 2px solid var(--accent-fill-rest);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.grid-header-cell {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    user-select: none;
}

.grid-header-cell[style*="cursor: pointer"]:hover {
    background: var(--neutral-layer-3);
}

/* Grid Scroll Container - Enhanced Scrollbar */
.grid-scroll-container {
    position: relative;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-fill-rest) var(--neutral-layer-1);
}

/* Webkit (Chrome, Safari, Edge) Scrollbar Styling */
.grid-scroll-container::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.grid-scroll-container::-webkit-scrollbar-track {
    background: var(--neutral-layer-1);
    border-radius: 0 4px 4px 0;
}

.grid-scroll-container::-webkit-scrollbar-thumb {
    background: var(--neutral-fill-stealth-rest);
    border-radius: 7px;
    border: 3px solid var(--neutral-layer-1);
}

.grid-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-fill-stealth-hover);
}

.grid-scroll-container::-webkit-scrollbar-thumb:active {
    background: var(--accent-fill-rest);
}

.grid-scroll-container::-webkit-scrollbar-corner {
    background: var(--neutral-layer-1);
}

/* Grid Rows */
.grid-row {
    border-bottom: 1px solid var(--neutral-stroke-rest);
    transition: background-color 0.2s ease;
}

.grid-row:hover {
    background-color: var(--neutral-layer-2);
}

.grid-row:last-child {
    border-bottom: none;
}

/* Grid Cell */
.grid-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Scroll to Top Button */
.scroll-to-top-button {
    position: absolute;
    bottom: 20px;
    right: 60px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-to-top-button:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* Sort Icons */
.grid-header-cell fluent-icon {
    flex-shrink: 0;
}

/* Loading Placeholder */
.grid-placeholder {
    padding: 10px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-header-cell {
        font-size: 0.9em;
    }
    
    .grid-cell {
        font-size: 0.9em;
    }
    
    .scroll-to-top-button {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 50px;
    }
    
    .grid-scroll-container::-webkit-scrollbar {
        width: 10px;
    }
}

/* Print Styles */
@media print {
    .scroll-to-top-button {
        display: none;
    }
    
    .grid-scroll-container {
        height: auto !important;
        overflow: visible !important;
        border: none;
    }
    
    .grid-scroll-container::-webkit-scrollbar {
        display: none;
    }
}
