/* --- CPC General Wrapper --- */
.cpc-calculator-wrapper {
	border: 1px solid #e0e0e0;
	padding: 20px; /* Increased padding */
	margin-bottom: 25px; /* More space before add-to-cart */
	background-color: #fdfdfd;
	border-radius: 4px;
}

.cpc-calculator-wrapper h3 {
	margin-top: 0;
	margin-bottom: 20px; /* More space after main title */
	font-size: 1.4em; /* Slightly larger title */
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

/* --- NEW: Two Column Layout --- */
.cpc-columns-container {
	display: flex;
	flex-wrap: wrap; /* Allow wrapping on smaller screens */
	gap: 30px; /* Space between columns */
	margin-bottom: 20px; /* Space before elements below (like add-to-cart) */
}

.cpc-left-column,
.cpc-right-column {
	flex-basis: calc(50% - 15px); /* 50% minus half the gap */
	flex-grow: 1; /* Allow columns to grow if needed */
	min-width: 280px; /* Prevent columns becoming too narrow */
}

/* --- Left Column: Configuration Inputs --- */
.cpc-left-column .cpc-input-row {
	margin-bottom: 12px; /* Consistent spacing */
	display: flex;
	flex-wrap: nowrap; /* Keep label and input on one line */
	align-items: center;
}

.cpc-left-column .cpc-input-row label {
	display: inline-block;
	width: 100px; /* Fixed label width */
	margin-right: 10px;
	font-weight: bold;
	flex-shrink: 0; /* Prevent label from shrinking */
}

.cpc-left-column .cpc-input-row input[type="number"],
.cpc-left-column .cpc-input-row select {
	flex-grow: 1; /* Input takes remaining space */
	padding: 8px;
	border: 1px solid #ccc;
	max-width: 200px; /* Control max input width */
}

/* --- Left Column: Main Price Display --- */
.cpc-left-column .cpc-price-display {
	margin-top: 25px; /* Space above final price */
	padding-top: 15px;
	border-top: 1px dashed #ccc;
	font-size: 1.2em; /* Larger final price */
}

.cpc-left-column #cpc-calculated-price {
	font-weight: bold;
	color: #0f834d; /* Or your theme's price color */
	margin-left: 10px;
	margin-right: 5px;
}

/* --- Right Column: Price Breakdown --- */
.cpc-right-column .cpc-breakdown-wrapper {
    /* No specific styles needed unless adding borders/background */
    /* Removed display:none / visibility:hidden */
    margin-top: 0; /* Align with top of left column */
}

.cpc-right-column .cpc-breakdown-wrapper h4 {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 1.1em;
}

table.cpc-price-breakdown {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

table.cpc-price-breakdown td {
	padding: 7px 4px; /* Slightly more vertical padding */
	border-bottom: 1px dotted #eee;
	vertical-align: middle; /* Center align vertically */
}

table.cpc-price-breakdown td.cpc-value {
	text-align: right;
	font-weight: 500;
	width: 100px; /* Adjust width as needed */
	white-space: nowrap; /* Prevent price from wrapping */
}

table.cpc-price-breakdown tr:last-child td {
	border-bottom: none;
}

table.cpc-price-breakdown tr.cpc-subtotal td {
	border-top: 1px solid #ddd; /* Slightly stronger line for subtotals */
	font-weight: bold;
	padding-top: 9px; /* More space for subtotals */
	padding-bottom: 5px;
}
table.cpc-price-breakdown tr.cpc-grand-total td {
	border-top: 2px solid #aaa; /* Stronger line for grand total */
	padding-top: 9px;
	font-size: 1.1em;
	color: #111; /* Darker color for grand total */
}

table.cpc-price-breakdown strong {
	 font-weight: bold; /* Ensure bold text is actually bold */
}


/* --- Add to Cart Button State (Keep from previous version) --- */
/* Style disabled add-to-cart button when calculator needs input */
form.cart .single_add_to_cart_button.disabled.wc-variation-selection-needed {
	background-color: #ccc !important; /* Make it obviously disabled */
	cursor: not-allowed !important;
}

/* --- Responsive Adjustments (Optional Example) --- */
@media (max-width: 768px) {
	.cpc-columns-container {
		flex-direction: column; /* Stack columns */
		gap: 20px;
	}

	.cpc-left-column,
	.cpc-right-column {
		flex-basis: 100%; /* Full width when stacked */
	}

    .cpc-right-column .cpc-breakdown-wrapper {
         margin-top: 20px; /* Add space when stacked */
    }

    .cpc-left-column .cpc-input-row input[type="number"],
    .cpc-left-column .cpc-input-row select {
        max-width: none; /* Allow inputs to take more space */
    }
}