/* Sleep Position Comfort Scorer Specific Styles */

/* Comfort Score Display */
.comfort-score-display {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 2px solid #10b981;
}

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

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

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

.position-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.position-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

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

.position-card.excellent {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.position-card.good {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.position-card.fair {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fefbf3, #fef3c7);
}

.position-card.poor {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.position-assessment {
    margin: 24px 0;
}

.position-assessment h4 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

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

.position-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

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

.position-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
}

.position-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.comfort-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    margin-bottom: 12px;
    -webkit-appearance: none;
    appearance: none;
}

.comfort-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.comfort-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.comfort-value {
    font-size: 24px;
    font-weight: 700;
    color: #2563eb;
    font-family: 'Roboto Mono', monospace;
}

.comfort-overview {
    margin-bottom: 32px;
}

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

.comfort-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.comfort-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.comfort-card.excellent {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.comfort-card.good {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff, #f1f5f9);
}

.comfort-card.fair {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.comfort-card.poor {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.comfort-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comfort-score {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Roboto Mono', monospace;
}

.comfort-card.excellent .comfort-score {
    color: #065f46;
}

.comfort-card.good .comfort-score {
    color: #1e40af;
}

.comfort-card.fair .comfort-score {
    color: #92400e;
}

.comfort-card.poor .comfort-score {
    color: #dc2626;
}

.comfort-description {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.position-breakdown {
    margin: 32px 0;
}

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

.breakdown-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s ease;
}

.breakdown-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

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

.breakdown-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    background: #2563eb;
}

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

.breakdown-score {
    font-size: 32px;
    font-weight: 700;
    color: #2563eb;
    font-family: 'Roboto Mono', monospace;
    margin-bottom: 12px;
}

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

.breakdown-recommendations {
    background: #f8fafc;
    border-radius: 6px;
    padding: 12px;
    border-left: 4px solid #2563eb;
}

.breakdown-recommendations h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.breakdown-recommendations ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.breakdown-recommendations li {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
    padding-left: 16px;
    position: relative;
}

.breakdown-recommendations li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

.mattress-recommendations {
    margin: 32px 0;
}

.recommendations-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.recommendation-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.recommendation-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

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

.recommendation-item.medium-priority {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff, #f1f5f9);
}

.recommendation-item.low-priority {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

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

.recommendation-priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recommendation-item.high-priority .recommendation-priority {
    background: #10b981;
    color: white;
}

.recommendation-item.medium-priority .recommendation-priority {
    background: #2563eb;
    color: white;
}

.recommendation-item.low-priority .recommendation-priority {
    background: #f59e0b;
    color: white;
}

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

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

.comfort-guidelines {
    space-y: 12px;
}

.guideline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.guideline-score {
    font-weight: 600;
    color: #2563eb;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
}

.guideline-desc {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.position-benefits {
    space-y: 12px;
}

.benefit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.benefit-position {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
}

.benefit-desc {
    font-weight: 500;
    color: #64748b;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .position-grid {
        grid-template-columns: 1fr;
    }
    
    .comfort-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
    
    .position-item {
        padding: 20px;
    }
    
    .position-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .comfort-summary {
        grid-template-columns: 1fr;
    }
    
    .position-item {
        padding: 16px;
    }
    
    .comfort-score {
        font-size: 24px;
    }
    
    .breakdown-score {
        font-size: 28px;
    }
    
    .guideline-item,
    .benefit-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Animation for comfort reveal */
@keyframes comfortReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.comfort-card.animate {
    animation: comfortReveal 0.6s ease-out;
}

/* Loading states */
.breakdown-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.breakdown-grid.loading::after {
    content: "Analyzing comfort patterns...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
}
