/* ============================================
   Flat Fee MLS Evaluator v2 - Styles
   ============================================ */

/* Overall Scorecard Container */
.ffme-scorecard-v2 {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Overall Score Section */
.ffme-overall-score {
    display: flex;
    align-items: center;
    gap: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 25px;
}

/* Score Badge */
.ffme-score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ffme-score-badge.ffme-grade-a {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.3);
}

.ffme-score-badge.ffme-grade-b {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.ffme-score-badge.ffme-grade-c {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.ffme-score-badge.ffme-grade-d,
.ffme-score-badge.ffme-grade-f {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 4px 12px rgba(250, 112, 154, 0.3);
}

.ffme-grade {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.ffme-score-number {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.95;
}

/* Score Meta Information */
.ffme-score-meta {
    flex: 1;
}

.ffme-score-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.ffme-last-reviewed {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ffme-icon {
    font-style: normal;
}

.ffme-methodology-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.ffme-methodology-link:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Category Scores Section */
.ffme-category-scores {
    margin-top: 25px;
}

.ffme-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Individual Category Item */
.ffme-category-item {
    margin-bottom: 20px;
    padding: 18px;
    background: #fafafa;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
    transition: all 0.2s;
}

.ffme-category-item:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

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

.ffme-category-icon {
    font-size: 24px;
    line-height: 1;
    min-width: 30px;
    text-align: center;
}

.ffme-category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ffme-category-label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.ffme-category-weight {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.ffme-category-score {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
    min-width: 60px;
    text-align: right;
}

/* Category Progress Bar */
.ffme-category-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ffme-category-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1 0%, #4facfe 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ffme-category-description {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Evidence Section */
.ffme-evidence-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.ffme-evidence-details {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0;
}

.ffme-evidence-summary {
    padding: 15px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.ffme-evidence-summary:hover {
    background: #f0f0f0;
}

.ffme-evidence-summary::-webkit-details-marker {
    display: none;
}

.ffme-evidence-list {
    padding: 0 18px 18px 18px;
}

.ffme-evidence-item {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.ffme-evidence-item:last-child {
    border-bottom: none;
}

.ffme-evidence-item a {
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}

.ffme-evidence-item a:hover {
    color: #135e96;
    text-decoration: underline;
}

.ffme-external-icon {
    font-size: 12px;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ffme-scorecard-v2 {
        padding: 20px;
    }
    
    .ffme-overall-score {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .ffme-score-badge {
        min-width: 100px;
        height: 100px;
    }
    
    .ffme-grade {
        font-size: 40px;
    }
    
    .ffme-score-number {
        font-size: 16px;
    }
    
    .ffme-score-title {
        font-size: 20px;
    }
    
    .ffme-category-header {
        flex-wrap: wrap;
    }
    
    .ffme-category-score {
        width: 100%;
        text-align: left;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .ffme-scorecard-v2 {
        padding: 15px;
        margin: 20px 0;
    }
    
    .ffme-category-item {
        padding: 12px;
    }
    
    .ffme-category-icon {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .ffme-scorecard-v2 {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .ffme-methodology-link {
        display: none;
    }
    
    .ffme-evidence-details[open] summary {
        display: none;
    }
}
