/* Mushroom Advanced Features Styles */

/* ==========================================
   COLONIZATION PROGRESS BARS
   ========================================== */

.colonization-progress-wrapper {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
}

.progress-percent {
    font-weight: bold;
    color: #4CAF50;
}

.colonization-progress {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5px;
    color: white;
    font-size: 11px;
}

.progress-actions {
    margin-top: 5px;
    text-align: right;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-small:hover {
    background: #1976D2;
}

/* ==========================================
   BATCH SCHEDULING CALENDAR
   ========================================== */

.scheduling-calendar {
    max-width: 900px;
    width: 90%;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-controls button {
    padding: 5px 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.batch-calendar {
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #ddd;
    padding: 2px;
    border-radius: 4px;
}

.calendar-header {
    background: #4CAF50;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
}

.calendar-day {
    background: white;
    min-height: 60px;
    padding: 5px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: #f0f0f0;
}

.calendar-day.empty {
    background: #fafafa;
}

.day-number {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.batch-indicators {
    display: flex;
    gap: 2px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.batch-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
}

.batch-dot.agar { background: #2196F3; }
.batch-dot.liquid { background: #9C27B0; }
.batch-dot.grain { background: #FF9800; }
.batch-dot.bulk { background: #795548; }

.schedule-form {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.schedule-form h3 {
    margin-top: 0;
    color: #333;
}

.schedule-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.upcoming-batches {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

#upcoming-list {
    max-height: 200px;
    overflow-y: auto;
}

/* ==========================================
   ENVIRONMENTAL LOGGING
   ========================================== */

.env-logging {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 4px;
}

.env-current {
    display: flex;
    gap: 15px;
}

.env-current span {
    font-size: 14px;
    font-weight: 500;
}

.temp {
    color: #f44336;
}

.humidity {
    color: #2196F3;
}

/* ==========================================
   LINEAGE TRACKING
   ========================================== */

.lineage-btn {
    background: #9C27B0 !important;
}

.lineage-modal {
    max-width: 800px;
    width: 90%;
}

#lineage-tree {
    padding: 20px;
    background: #fafafa;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tree-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.node-content {
    padding: 10px 15px;
    background: white;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 120px;
}

.node-content strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.node-content span {
    font-size: 11px;
    color: #666;
    display: block;
}

.node-content.contaminated {
    border-color: #f44336;
    background: #ffebee;
}

.node-content.ready {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.parent-line,
.child-line {
    width: 2px;
    height: 30px;
    background: #999;
    margin: 10px auto;
}

.parent-node {
    margin-top: 20px;
}

.children-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.child-node {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lineage-stats {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.lineage-stats h3 {
    margin-top: 0;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.stats-grid div {
    padding: 8px;
    background: white;
    border-radius: 4px;
}

.stats-grid strong {
    color: #4CAF50;
}

/* ==========================================
   QR CODE SYSTEM
   ========================================== */

.qr-btn {
    background: #FF5722 !important;
}

.qr-modal {
    max-width: 500px;
}

.qr-display {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qr-display img {
    max-width: 200px;
    margin: 0 auto 10px;
    display: block;
}

.qr-display p {
    margin: 5px 0;
    font-weight: 500;
}

.qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.culture-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

/* ==========================================
   NOTIFICATIONS
   ========================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10001;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: #4CAF50;
    color: white;
}

.notification.warning {
    background: #FF9800;
    color: white;
}

.notification.error {
    background: #f44336;
    color: white;
}

.notification h4 {
    margin: 0 0 5px 0;
}

.notification p {
    margin: 5px 0;
}

.notification button {
    margin-top: 10px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
}

.notification button:hover {
    background: rgba(255,255,255,0.3);
}

/* Culture item enhancements */
.culture-item {
    position: relative;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.culture-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.culture-code {
    font-weight: bold;
    color: #333;
}

.culture-details {
    font-size: 12px;
    color: #666;
}
