/**
 * FM Design Pricing - Price Breakdown Styling
 */

.fm-price-breakdown {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.fm-price-breakdown h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Design Costs Section */
.fm-design-costs {
    margin-bottom: 20px;
}

.fm-element-cost {
    background: white;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fm-element-cost > strong:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #2c3e50;
}

.fm-element-price {
    font-weight: 700;
    color: #667eea;
    font-size: 16px;
}

.fm-cost-details {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #6c757d;
}

.fm-cost-details li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.fm-cost-details li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #999;
}

.fm-design-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-top: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

.fm-design-total .fm-price {
    font-size: 20px;
    font-weight: 700;
}

/* Product Variants Section */
.fm-variant-costs {
    border-top: 2px dashed #e9ecef;
    padding-top: 20px;
}

.fm-variant-row {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.fm-variant-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-variant-info strong {
    font-size: 14px;
    color: #2c3e50;
}

.fm-variant-qty {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.fm-variant-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.fm-variant-detail {
    font-size: 12px;
    color: #6c757d;
}

.fm-variant-total {
    font-size: 18px;
    color: #28a745;
    font-weight: 700;
}

.fm-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-top: 15px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 12px;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.fm-grand-total .fm-price-large {
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .fm-variant-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fm-variant-prices {
        align-items: flex-start;
        width: 100%;
    }
    
    .fm-grand-total {
        flex-direction: column;
        gap: 10px;
    }
    
    .fm-price-breakdown {
        padding: 15px;
    }
}

/* Price Summary Widget (voor in designer modal) */
.fm-price-summary {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.fm-price-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.fm-price-summary-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.fm-price-summary-total {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.fm-price-summary-items {
    margin: 15px 0;
}

.fm-price-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #6c757d;
}

.fm-price-summary-item strong {
    color: #2c3e50;
}

.fm-price-summary-footer {
    padding-top: 15px;
    border-top: 2px solid #f8f9fa;
    margin-top: 15px;
}

.fm-price-info-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 10px;
    border-left: 3px solid #ffc107;
}

/* Animation for price updates */
@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fm-price-animate {
    animation: priceUpdate 0.3s ease-in-out;
}
