/* Lifecycle Slider Styles */

.lifecycle-slider {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.slider-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.age-display {
    font-size: 18px;
    font-weight: bold;
    color: #2e7d32;
}

.slider-track {
    height: 50px;
    display: flex;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.15);
    position: relative;
}

.zone {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.zone:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.zone span {
    z-index: 2;
    position: relative;
    font-size: 12px;
}

.zone.fresh {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
}

.zone.optimal {
    background: linear-gradient(135deg, #66BB6A 0%, #FDD835 100%);
}

.zone.aging {
    background: linear-gradient(135deg, #FDD835 0%, #FF9800 100%);
}

.zone.critical {
    background: linear-gradient(135deg, #FF9800 0%, #F44336 100%);
}

.current-position {
    position: absolute;
    top: 65px;
    transition: left 0.3s ease;
    z-index: 10;
    margin-left: -12px;
}

.marker {
    font-size: 24px;
    color: #333;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    margin-bottom: 5px;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.current-position:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.slider-info {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dates {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

.dates span {
    display: flex;
    align-items: center;
}

.action-message {
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    background: #e3f2fd;
    color: #1976d2;
}

.action-message:has(✅) {
    background: #e8f5e9;
    color: #2e7d32;
}

.action-message:has(⚠️) {
    background: #fff8e1;
    color: #f57c00;
}

.action-message:has(🚨) {
    background: #ffebee;
    color: #c62828;
}

.action-message:has(❌) {
    background: #fafafa;
    color: #616161;
}

/* Zone info tooltip */
.zone-info-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    display: none;
    max-width: 200px;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .zone span {
        font-size: 10px;
    }
    
    .slider-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .dates {
        flex-direction: column;
        gap: 5px;
    }
    
    .action-message {
        width: 100%;
        text-align: center;
    }
    
    .slider-track {
        height: 40px;
    }
    
    .current-position {
        top: 55px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lifecycle-slider {
        background: #1e1e1e;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .slider-header h4 {
        color: #e0e0e0;
    }
    
    .age-display {
        color: #66bb6a;
    }
    
    .slider-track {
        box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
    }
    
    .marker {
        color: #e0e0e0;
    }
    
    .dates {
        color: #999;
    }
}
