/* Biology Lab Simulation Styles */

/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Section management */
.section {
    transition: all 0.3s ease-in-out;
}

.section.hidden {
    display: none !important;
}

/* Chromosome styles */
.chromosome {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px solid #1e40af;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    user-select: none;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.chromosome:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.chromosome.large {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

.chromosome.medium {
    background: linear-gradient(135deg, #059669, #10b981);
}

.chromosome.small {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.chromosome.metacentric::before {
    content: '●';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 8px;
}

.chromosome.submetacentric::before {
    content: '◐';
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 8px;
}

.chromosome.acrocentric::before {
    content: '▲';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 6px;
}

/* Karyogram grid */
.karyogram-pair {
    position: relative;
    min-height: 80px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.karyogram-pair:hover {
    background-color: #f3f4f6 !important;
    border-color: #6b7280 !important;
}

.karyogram-pair.bg-green-100 {
    background-color: #dcfce7 !important;
    border-color: #22c55e !important;
}

.karyogram-pair.bg-red-100 {
    background-color: #fee2e2 !important;
    border-color: #ef4444 !important;
}

/* Chromosome pool */
#chromosome-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    padding: 16px;
}

/* Drag and drop visual feedback */
.chromosome.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.karyogram-pair.drag-over {
    background-color: #dbeafe !important;
    border-color: #3b82f6 !important;
    transform: scale(1.02);
}

/* Mutation visualization */
.mutation-visualization {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Button hover effects */
.mutation-btn {
    transition: all 0.2s ease;
    text-align: center;
}

.mutation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Form styling */
input[type="text"], 
input[type="date"], 
textarea {
    transition: all 0.2s ease;
}

input[type="text"]:focus, 
input[type="date"]:focus, 
textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

/* Progress indicators */
.lab-progress-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.lab-progress-item:last-child {
    border-bottom: none;
}

.progress-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #22c55e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chromosome {
        width: 20px !important;
        height: 40px !important;
        font-size: 10px;
    }
    
    .karyogram-pair {
        min-height: 60px;
    }
    
    #chromosome-pool {
        padding: 12px;
    }
}

/* Print styles for protocol */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-white {
        background: white !important;
        box-shadow: none !important;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

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

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(45, 80, 22, 0.3);
    border-radius: 50%;
    border-top-color: #2d5016;
    animation: spin 1s ease-in-out infinite;
}

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

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}