/* Mattress Firmness Aging Predictor Specific Styles */

/* Firmness Timeline Display */
.firmness-timeline {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 2px solid #10b981;
}

.timeline-header {
    text-align: center;
    margin-bottom: 20px;
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 8px;
}

.timeline-subtitle {
    font-size: 14px;
    color: #064e3b;
}

.firmness-chart {
    display: flex;
    justify-content: space-between;
    align-items: end;
    height: 200px;
    margin: 20px 0;
    padding: 0 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
    position: relative;
}

.chart-axis {
    position: absolute;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 1px;
    background: #e2e8f0;
}

.chart-axis::before {
    content: "Firmness Level";
    position: absolute;
    top: -10px;
    left: -40px;
    font-size: 12px;
    color: #64748b;
    transform: rotate(-90deg);
    transform-origin: center;
}

.timeline-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 80px;
    position: relative;
}

.point-visual {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    position: relative;
    z-index: 2;
}

.point-visual.current {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    width: 16px;
    height: 16px;
}

.point-visual.target {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    width: 16px;
    height: 16px;
}

.point-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transform: translateY(-50%);
    z-index: 1;
}

.point-label {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    white-space: nowrap;
}

.point-value {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Target Achievement Display */
.target-achievement {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.achievement-item {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-item:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.achievement-item.achieved {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.achievement-item.in-progress {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fefbf3, #fef3c7);
}

.achievement-item.future {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.achievement-item.achieved .achievement-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.achievement-item.in-progress .achievement-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.achievement-item.future .achievement-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.achievement-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.achievement-timeline {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.achievement-item.achieved .achievement-timeline {
    color: #059669;
}

.achievement-item.in-progress .achievement-timeline {
    color: #d97706;
}

.achievement-item.future .achievement-timeline {
    color: #1d4ed8;
}

.achievement-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

/* Break-in Schedule */
.breakin-schedule {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #93c5fd;
}

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

.schedule-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #bfdbfe;
    transition: all 0.3s ease;
}

.schedule-item:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

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

.schedule-phase {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.schedule-duration {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
}

.schedule-firmness {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
}

.firmness-from,
.firmness-to {
    text-align: center;
}

.firmness-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.firmness-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.firmness-arrow {
    font-size: 20px;
    color: #2563eb;
}

.schedule-tips {
    margin-top: 16px;
}

.schedule-tips h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tip-item {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tip-item i {
    color: #2563eb;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Optimization Tips */
.optimization-tips {
    background: linear-gradient(135deg, #fefbf3, #fef3c7);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #fbbf24;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.optimization-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #fbbf24;
    transition: all 0.3s ease;
}

.optimization-item:hover {
    border-color: #f59e0b;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
}

.optimization-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.optimization-info {
    flex: 1;
}

.optimization-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.optimization-category {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
    background: #fef3c7;
    color: #d97706;
}

.optimization-priority {
    text-align: right;
}

.priority-level {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
}

.priority-level.high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-level.medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-level.low {
    background: #dcfce7;
    color: #059669;
}

.optimization-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 16px 0;
}

.optimization-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.action-tag {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 12px;
}

.optimization-impact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.impact-label {
    font-size: 14px;
    color: #64748b;
}

.impact-value {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

/* Firmness Scale Visualization */
.firmness-scale {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scale-visual {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    margin: 20px 0;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #3b82f6, #6366f1);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.scale-marker {
    position: absolute;
    top: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
}

.scale-marker.current {
    border-color: #10b981;
    background: #10b981;
}

.scale-marker.target {
    border-color: #f59e0b;
    background: #f59e0b;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

.scale-label {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    flex: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .achievement-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .firmness-chart {
        height: 150px;
        padding: 0 10px;
    }
    
    .timeline-point {
        max-width: 60px;
    }
    
    .point-value {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .point-label {
        font-size: 9px;
    }
    
    .firmness-timeline {
        padding: 20px;
    }
    
    .target-achievement {
        padding: 20px;
    }
    
    .breakin-schedule {
        padding: 20px;
    }
    
    .optimization-tips {
        padding: 20px;
    }
    
    .achievement-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .achievement-title {
        font-size: 14px;
    }
    
    .achievement-timeline {
        font-size: 16px;
    }
    
    .optimization-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .optimization-priority {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .achievement-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .achievement-item {
        padding: 16px;
    }
    
    .schedule-item {
        padding: 16px;
    }
    
    .optimization-item {
        padding: 16px;
    }
    
    .firmness-chart {
        height: 120px;
        padding: 0 5px;
    }
    
    .timeline-point {
        max-width: 45px;
        gap: 4px;
    }
    
    .point-visual {
        width: 8px;
        height: 8px;
    }
    
    .point-visual.current,
    .point-visual.target {
        width: 12px;
        height: 12px;
    }
    
    .firmness-timeline {
        padding: 16px;
    }
    
    .target-achievement {
        padding: 16px;
    }
    
    .breakin-schedule {
        padding: 16px;
    }
    
    .optimization-tips {
        padding: 16px;
    }
    
    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .schedule-duration {
        align-self: flex-start;
    }
    
    .optimization-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .scale-visual {
        height: 40px;
        border-radius: 20px;
    }
    
    .scale-marker {
        width: 16px;
        height: 16px;
        top: -8px;
    }
}
