/* 
 * Photo Analysis Page Styles
 * FitTeen Australia Theme
 */

/* Photo Upload Container */
.photo-upload-container {
    margin: 2rem 0;
}

.upload-zone {
    border: 3px dashed var(--border-light);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    background: rgba(76, 175, 80, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-green);
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.02);
}

.upload-content {
    max-width: 400px;
    margin: 0 auto;
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(76, 175, 80, 0.2));
}

.upload-content h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.upload-content p {
    color: var(--text-medium);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.upload-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.upload-btn:hover {
    background: linear-gradient(135deg, #45a049, #66bb69);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.upload-btn:hover::before {
    left: 100%;
}

.camera-btn {
    background: linear-gradient(135deg, #FF6B6B, #FF8A80);
}

.camera-btn:hover {
    background: linear-gradient(135deg, #FF5252, #FF7043);
}

.file-btn {
    background: linear-gradient(135deg, var(--accent-orange), #ffb74d);
}

.file-btn:hover {
    background: linear-gradient(135deg, #f57c00, #ffb74d);
}

/* Photo Preview */
.photo-preview {
    text-align: center;
    margin: 2rem 0;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.photo-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.photo-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.analyze-btn {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.analyze-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.analyze-btn:hover {
    background: linear-gradient(135deg, #26D0CE, #1A5490);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.5);
}

.analyze-btn:hover::before {
    left: 100%;
}

.analyze-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.retake-btn {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retake-btn:hover {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6);
    transform: translateY(-2px);
}

/* Analysis Results */
.analysis-results {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.results-header h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
}

.confidence-score {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.detected-foods h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.food-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.food-detection-item {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease;
}

.food-detection-item:hover {
    transform: translateY(-2px);
}

.food-detection-item .food-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.food-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.portion {
    font-weight: 600;
    color: var(--primary-green);
}

.confidence {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary-green);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Nutrition Summary */
.nutrition-summary h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.nutrition-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9ff;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.nutrition-label {
    font-size: 0.8rem;
    color: var(--text-medium);
    font-weight: 500;
}

.nutrition-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-top: 0.25rem;
}

/* Health Insights */
.health-insights h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.insights-content {
    background: rgba(76, 175, 80, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.insight-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.insight-item.positive {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--primary-green);
    color: var(--text-dark);
}

.insight-item.neutral {
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid var(--accent-orange);
    color: var(--text-dark);
}

/* Bottom Actions */
.photo-actions-bottom {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.save-meal-btn {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.save-meal-btn:hover {
    background: linear-gradient(135deg, #45a049, #66bb69);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.share-btn {
    background: linear-gradient(135deg, #3498db, #5dade2);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.share-btn:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Tips Section */
.photo-tips {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.photo-tips h3 {
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f8f9ff;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-2px);
}

.tip-icon {
    font-size: 2rem;
    color: var(--primary-green);
    flex-shrink: 0;
}

.tip-content h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.tip-content p {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .upload-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .upload-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .photo-actions,
    .photo-actions-bottom {
        flex-direction: column;
        align-items: center;
    }
    
    .analyze-btn,
    .retake-btn,
    .save-meal-btn,
    .share-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}