/* Mushroom Lifecycle Manager Styles */

/* Alert Notifications */
.lifecycle-alert-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: slideIn 0.3s ease-out;
}

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

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: white;
    border-radius: 8px 8px 0 0;
}

.alert-title {
    font-weight: bold;
    font-size: 16px;
}

.alert-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.alert-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
}

.alert-item.critical {
    background: #ffe0e0;
    border-left-color: #dc3545;
}

.alert-item.high {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.alert-item.medium {
    background: #e7f3ff;
    border-left-color: #0dcaf0;
}

.alert-item.low {
    background: #e8f5e9;
    border-left-color: #28a745;
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-message {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.alert-action-btn {
    align-self: flex-start;
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.alert-action-btn:hover {
    background: #0056b3;
}

.alert-more {
    padding: 12px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.alert-more button {
    margin-left: 8px;
    color: #007bff;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* Daily Summary Notification */
.daily-summary-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideUp 0.3s ease-out;
}

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

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px 12px 0 0;
}

.summary-header h3 {
    margin: 0;
    font-size: 18px;
}

.summary-date {
    font-size: 12px;
    opacity: 0.9;
}

.summary-content {
    padding: 16px;
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.summary-stat:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.summary-alerts {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.summary-alerts h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #ff6b6b;
}

.summary-alerts ul {
    margin: 0;
    padding-left: 20px;
}

.summary-alerts li {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.summary-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #eee;
}

.summary-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.summary-actions button:first-child {
    background: #667eea;
    color: white;
}

.summary-actions button:first-child:hover {
    background: #5a67d8;
}

.summary-actions button:last-child {
    background: #f0f0f0;
    color: #666;
}

.summary-actions button:last-child:hover {
    background: #e0e0e0;
}

/* Progress Timeline */
.progress-timeline {
    padding: 20px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.timeline-item.completed {
    background: #e8f5e9;
    border-color: #4caf50;
}

.timeline-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.timeline-label {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.timeline-date {
    font-size: 13px;
    color: #666;
}

.progress-stats {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-stats h3 {
    margin: 0 0 16px;
    color: #333;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat .stat-label {
    font-size: 12px;
    color: #666;
}

.stat .stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.progress-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.progress-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.progress-actions button:first-child {
    background: #007bff;
    color: white;
}

.progress-actions button:first-child:hover {
    background: #0056b3;
}

.progress-actions button:not(:first-child) {
    background: #f0f0f0;
    color: #333;
}

.progress-actions button:not(:first-child):hover {
    background: #e0e0e0;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    z-index: 10002;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #333;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lifecycle-alert-notification {
        max-width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
    
    .daily-summary-notification {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-actions {
        flex-direction: column;
    }
}

/* Alert Badge Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.alert-badge {
    animation: pulse 2s infinite;
}

/* Loading State */
.loading-cultures {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.loading-cultures::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

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