/* assets/css/custom.css */
/* Minimal custom styles - most styling is done with TailwindCSS */

/* Smooth transitions for drag operations */
.draggable {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.draggable:active {
    cursor: grabbing;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade in animation for modals */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#modals > div {
    animation: fadeIn 0.2s ease-in;
}

/* Table hover effects */
.gene-row {
    transition: background-color 0.15s ease;
}

/* Chart tooltip positioning */
#d3-chart-container {
    position: relative;
}

/* Custom Tailwind-styled tooltips for cell populations */
.population-tooltip-wrapper {
    position: relative;
}

.population-tooltip {
    display: none;
    position: fixed;
    z-index: 9999;
    background-color: #1f2937;
    color: #ffffff;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: max-content;
    max-width: 320px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    font-size: 0.875rem;
    line-height: 1.5;
}

.population-tooltip::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1f2937;
}

/* Arrow for tooltip on the left side */
.population-tooltip.tooltip-left::after {
    right: auto;
    left: 100%;
    border-right-color: transparent;
    border-left-color: #1f2937;
}

.population-tooltip-wrapper:hover .population-tooltip {
    display: block;
    opacity: 1;
}

.population-tooltip-line {
    display: block;
    margin-bottom: 0.25rem;
}

.population-tooltip-line:last-child {
    margin-bottom: 0;
}

.population-tooltip-label {
    font-weight: 600;
    color: #93c5fd;
}

.population-tooltip-value {
    color: #e5e7eb;
}

/* Print styles */
@media print {
    #sidebar,
    #groups,
    button {
        display: none !important;
    }
    
    #results {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .grid-cols-12 {
        grid-template-columns: 1fr;
    }
    
    .col-span-3,
    .col-span-4,
    .col-span-5 {
        grid-column: span 12;
    }
}
