/* Warranty Value Calculator Specific Styles */

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

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

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

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

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

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

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

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

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

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

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

.coverage-options {
    margin-top: 20px;
}

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

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

.coverage-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;
}

.coverage-item:hover {
    border-color: #2563eb;
    background: #f1f5f9;
}

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

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

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

.coverage-item:has(input[type="checkbox"]:checked) {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff, #f1f5f9);
}

.coverage-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;
}

.coverage-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;
}

.coverage-details {
    flex: 1;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.value-card.good .value-amount {
    color: #1e40af;
}

.value-card.average .value-amount {
    color: #92400e;
}

.value-card.poor .value-amount {
    color: #dc2626;
}

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

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

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

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

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

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

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

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

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

.coverage-card.covered .coverage-icon {
    background: #10b981;
}

.coverage-card.not-covered .coverage-icon {
    background: #ef4444;
}

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

.coverage-status {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coverage-card.covered .coverage-status {
    color: #065f46;
}

.coverage-card.not-covered .coverage-status {
    color: #dc2626;
}

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

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

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

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

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

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

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

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

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

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

.risk-card.low .risk-icon {
    background: #10b981;
}

.risk-card.medium .risk-icon {
    background: #f59e0b;
}

.risk-card.high .risk-icon {
    background: #ef4444;
}

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

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

.risk-card.low .risk-probability {
    color: #065f46;
}

.risk-card.medium .risk-probability {
    color: #92400e;
}

.risk-card.high .risk-probability {
    color: #dc2626;
}

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

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

.recommendation-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.buy {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

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

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

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

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

.recommendation-item.buy .recommendation-badge {
    background: #10b981;
    color: white;
}

.recommendation-item.avoid .recommendation-badge {
    background: #ef4444;
    color: white;
}

.recommendation-item.consider .recommendation-badge {
    background: #f59e0b;
    color: white;
}

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

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

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

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

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

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

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

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

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

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

.guideline-item.excellent span {
    color: #065f46;
}

.guideline-item.good span {
    color: #1e40af;
}

.guideline-item.average span {
    color: #92400e;
}

.guideline-item.poor span {
    color: #dc2626;
}

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

.priority-list {
    space-y: 12px;
}

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

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

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

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

.priority-label {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-item.high .priority-label {
    color: #dc2626;
}

.priority-item.medium .priority-label {
    color: #92400e;
}

.priority-item.low .priority-label {
    color: #065f46;
}

.priority-coverage {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .coverage-grid {
        grid-template-columns: 1fr;
    }
    
    .value-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .coverage-breakdown {
        grid-template-columns: 1fr;
    }
    
    .risk-factors {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .value-summary {
        grid-template-columns: 1fr;
    }
    
    .recommendation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .priority-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

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

.value-card.animate {
    animation: valueReveal 0.6s ease-out;
}

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

.coverage-breakdown.loading::after {
    content: "Analyzing warranty value...";
    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;
}
