/* Upgrade Benefit Calculator Specific Styles */

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

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

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

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

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

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

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

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

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

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

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

.sleep-issues {
    margin-top: 20px;
}

.sleep-issues h4 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.issue-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.issue-item:hover {
    border-color: #ef4444;
    background: #fef2f2;
}

.issue-item input[type="checkbox"] {
    display: none;
}

.issue-item input[type="checkbox"]:checked + .checkmark {
    background: #ef4444;
    border-color: #ef4444;
}

.issue-item input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

.issue-item:has(input[type="checkbox"]:checked) {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.issue-item .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.issue-item .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.issue-details {
    flex: 1;
}

.issue-details strong {
    display: block;
    color: #1e293b;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.issue-details span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

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

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

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

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

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

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

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

.benefit-card.low {
    border-color: #6b7280;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

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

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

.benefit-card.excellent .benefit-value {
    color: #065f46;
}

.benefit-card.high .benefit-value {
    color: #1e40af;
}

.benefit-card.moderate .benefit-value {
    color: #92400e;
}

.benefit-card.low .benefit-value {
    color: #6b7280;
}

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

.improvement-analysis {
    margin: 32px 0;
}

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

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

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

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

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

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

.improvement-card.minimal {
    border-color: #6b7280;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

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

.improvement-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.improvement-card.major .improvement-icon {
    background: #10b981;
}

.improvement-card.significant .improvement-icon {
    background: #2563eb;
}

.improvement-card.moderate .improvement-icon {
    background: #f59e0b;
}

.improvement-card.minimal .improvement-icon {
    background: #6b7280;
}

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

.improvement-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Roboto Mono', monospace;
}

.improvement-card.major .improvement-value {
    color: #065f46;
}

.improvement-card.significant .improvement-value {
    color: #1e40af;
}

.improvement-card.moderate .improvement-value {
    color: #92400e;
}

.improvement-card.minimal .improvement-value {
    color: #6b7280;
}

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

.roi-analysis {
    margin: 32px 0;
}

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

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

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

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

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

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

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

.roi-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.roi-card.positive .roi-icon {
    background: #10b981;
}

.roi-card.neutral .roi-icon {
    background: #f59e0b;
}

.roi-card.negative .roi-icon {
    background: #ef4444;
}

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

.roi-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Roboto Mono', monospace;
}

.roi-card.positive .roi-value {
    color: #065f46;
}

.roi-card.neutral .roi-value {
    color: #92400e;
}

.roi-card.negative .roi-value {
    color: #dc2626;
}

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

.health-benefits {
    margin: 32px 0;
}

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

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

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

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

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

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

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

.health-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.health-card.high-benefit .health-icon {
    background: #10b981;
}

.health-card.medium-benefit .health-icon {
    background: #2563eb;
}

.health-card.low-benefit .health-icon {
    background: #f59e0b;
}

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

.health-benefit {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Roboto Mono', monospace;
}

.health-card.high-benefit .health-benefit {
    color: #065f46;
}

.health-card.medium-benefit .health-benefit {
    color: #1e40af;
}

.health-card.low-benefit .health-benefit {
    color: #92400e;
}

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

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

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

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

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

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

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

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

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

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

.strategy-item.recommended .strategy-priority {
    background: #10b981;
    color: white;
}

.strategy-item.consider .strategy-priority {
    background: #2563eb;
    color: white;
}

.strategy-item.optional .strategy-priority {
    background: #f59e0b;
    color: white;
}

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

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

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

.strategy-action {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.strategy-action:hover {
    background: #e2e8f0;
    border-color: #2563eb;
    color: #2563eb;
}

.benefit-categories {
    space-y: 12px;
}

.category-item {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
}

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

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

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

.category-item.longevity {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-color: #6b7280;
}

.category-item strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-item span {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    font-family: 'Roboto Mono', monospace;
}

.category-item.comfort span {
    color: #1e40af;
}

.category-item.health span {
    color: #065f46;
}

.category-item.sleep span {
    color: #92400e;
}

.category-item.longevity span {
    color: #374151;
}

.category-item small {
    color: #64748b;
    font-size: 12px;
}

.roi-factors {
    space-y: 12px;
}

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

.factor-name {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.factor-impact {
    font-weight: 600;
    color: #2563eb;
    font-size: 12px;
    font-family: 'Roboto Mono', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .issues-grid {
        grid-template-columns: 1fr;
    }
    
    .benefit-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .improvement-breakdown {
        grid-template-columns: 1fr;
    }
    
    .roi-breakdown {
        grid-template-columns: 1fr;
    }
    
    .health-impact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .benefit-summary {
        grid-template-columns: 1fr;
    }
    
    .strategy-actions {
        flex-direction: column;
    }
    
    .factor-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

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

.benefit-card.animate {
    animation: benefitReveal 0.6s ease-out;
}

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

.improvement-breakdown.loading::after {
    content: "Calculating upgrade benefits...";
    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;
}
