/* Enhanced Mushroom Module Styles */

/* Strain and Culture Cards */
.strain-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.strain-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.strain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.strain-actions {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Culture Status List */
.culture-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    border-left: 4px solid #ddd;
    transition: all 0.3s;
}

.culture-item.status-good {
    border-left-color: #4caf50;
}

.culture-item.status-warning {
    border-left-color: #ff9800;
    background: #fffbf0;
}

.culture-item.status-critical {
    border-left-color: #f44336;
    background: #fff5f5;
}

.culture-item.status-expired {
    border-left-color: #666;
    opacity: 0.7;
}

.culture-info {
    margin-bottom: 10px;
}

.culture-code {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.culture-details {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

.culture-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.status-emoji {
    font-size: 20px;
}

.age-text {
    color: #666;
    font-size: 14px;
}

.days-remaining {
    color: #ff9800;
    font-size: 14px;
    font-weight: 500;
}

.culture-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-harvest {
    background: linear-gradient(135deg, #8bc34a, #689f38);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-harvest:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 195, 74, 0.4);
}

/* Lifecycle Slider */
.lifecycle-slider {
    margin-top: 12px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

.lifecycle-track {
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.lifecycle-progress {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #ff9800, #f44336);
    transition: width 0.3s;
}

.lifecycle-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
}

/* Harvest List */
.harvest-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
}

.harvest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
}

.harvest-info {
    flex: 1;
}

.harvest-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.harvest-weight {
    background: #4caf50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
}

.harvest-flush {
    background: #2196f3;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 13px;
}

.harvest-quality {
    color: #ff9800;
    font-weight: 500;
}

/* Analytics Modal */
.modal-large {
    max-width: 800px;
    width: 90%;
}

.analytics-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.analytics-table {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
}

.analytics-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.analytics-row:last-child {
    border-bottom: none;
}

/* Harvest Modal Form */
#harvestModal .form-group {
    margin-bottom: 15px;
}

#harvestModal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

#harvestModal input[type="number"],
#harvestModal select,
#harvestModal textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#harvestModal input[type="range"] {
    width: calc(100% - 40px);
    margin-right: 10px;
}

#quality-display {
    font-weight: 600;
    color: #4caf50;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .culture-actions {
        justify-content: space-between;
    }
    
    .analytics-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .harvest-stats {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .strain-card,
    .culture-item,
    .harvest-item,
    .modal-content {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .culture-item.status-warning {
        background: #3e3420;
    }
    
    .culture-item.status-critical {
        background: #3e2020;
    }
    
    .btn-icon:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .lifecycle-slider {
        background: #1a1a1a;
    }
    
    .analytics-table {
        background: #34495e;
    }
}
