/* Mattress Allergy Risk Assessor Specific Styles */

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

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

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

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

.risk-level-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.risk-meter {
    width: 300px;
    height: 20px;
    background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.risk-pointer {
    position: absolute;
    top: -5px;
    width: 30px;
    height: 30px;
    background: white;
    border: 3px solid #1e293b;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.5s ease;
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.overall-risk-card {
    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);
    text-align: center;
}

.risk-score {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.risk-score.low {
    color: #10b981;
}

.risk-score.moderate {
    color: #f59e0b;
}

.risk-score.high {
    color: #ef4444;
}

.risk-score.severe {
    color: #dc2626;
}

.risk-description {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 16px;
}

.risk-recommendation {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

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

.recommendation-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* Material Risk Analysis */
.material-risks {
    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);
}

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

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

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

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

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

.material-item.avoid {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

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

.material-info {
    flex: 1;
}

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

.material-type {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
}

.material-item.safe .material-type {
    background: #dcfce7;
    color: #059669;
}

.material-item.caution .material-type {
    background: #fef3c7;
    color: #d97706;
}

.material-item.avoid .material-type {
    background: #fee2e2;
    color: #dc2626;
}

.material-risk-level {
    text-align: right;
}

.risk-badge {
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-badge.safe {
    background: #dcfce7;
    color: #059669;
}

.risk-badge.caution {
    background: #fef3c7;
    color: #d97706;
}

.risk-badge.avoid {
    background: #fee2e2;
    color: #dc2626;
}

.material-details {
    margin: 16px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.detail-label {
    color: #64748b;
}

.detail-value {
    font-weight: 600;
    color: #1e293b;
}

.allergen-list {
    margin: 16px 0;
}

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

.allergens {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

.allergen-tag.high-risk {
    background: #fee2e2;
    color: #dc2626;
}

.allergen-tag.moderate-risk {
    background: #fef3c7;
    color: #d97706;
}

/* Safe Alternatives Display */
.safe-alternatives {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #10b981;
}

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

.alternative-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #bbf7d0;
    transition: all 0.3s ease;
    position: relative;
}

.alternative-item:hover {
    border-color: #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

.alternative-item.recommended::before {
    content: "TOP CHOICE";
    position: absolute;
    top: 12px;
    right: -25px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 3px 30px;
    font-size: 10px;
    font-weight: 600;
    transform: rotate(45deg);
    letter-spacing: 0.5px;
}

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

.alternative-info {
    flex: 1;
}

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

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

.alternative-rating {
    text-align: right;
}

.safety-score {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 4px;
}

.safety-label {
    font-size: 11px;
    color: #64748b;
}

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

.alternative-benefits {
    margin: 16px 0;
}

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

.benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.benefit-item i {
    width: 16px;
    color: #10b981;
}

.alternative-certifications {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0;
}

.certification-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0369a1;
    text-transform: uppercase;
}

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

.pricing-label {
    font-size: 13px;
    color: #64748b;
}

.pricing-range {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* Prevention Tips Display */
.prevention-tips {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #93c5fd;
}

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

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

.tip-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.tip-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

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

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

.tip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .materials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .alternatives-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .risk-meter {
        width: 250px;
    }
    
    .material-item {
        padding: 16px;
    }
    
    .alternative-item {
        padding: 16px;
    }
    
    .tip-item {
        padding: 16px;
    }
    
    .material-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .material-risk-level {
        text-align: left;
    }
    
    .alternative-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .alternative-rating {
        text-align: left;
    }
    
    .alternative-item.recommended::before {
        display: none;
    }
    
    .alternative-item.recommended .alternative-name::after {
        content: " (Top Choice)";
        font-size: 12px;
        color: #059669;
        font-weight: 500;
    }
    
    .alternative-pricing {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .risk-assessment {
        padding: 20px;
    }
    
    .material-risks {
        padding: 20px;
    }
    
    .safe-alternatives {
        padding: 20px;
    }
    
    .prevention-tips {
        padding: 20px;
    }
    
    .overall-risk-card {
        padding: 20px;
    }
    
    .material-item {
        padding: 12px;
    }
    
    .alternative-item {
        padding: 12px;
    }
    
    .tip-item {
        padding: 12px;
    }
    
    .risk-score {
        font-size: 36px;
    }
    
    .risk-meter {
        width: 200px;
        height: 16px;
    }
    
    .risk-pointer {
        width: 24px;
        height: 24px;
        top: -4px;
    }
    
    .tip-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .allergens {
        flex-direction: column;
        gap: 4px;
    }
    
    .alternative-certifications {
        flex-direction: column;
        gap: 4px;
    }
    
    .tip-actions {
        flex-direction: column;
        gap: 6px;
    }
}
