/* WC Advance Payment Pro - Frontend styles */

.wc-ap-box {
	--wc-ap-primary: #a86a45;
	--wc-ap-primary-light: #f7efe9;
	--wc-ap-border: #e6e1db;
	--wc-ap-text: #222222;
	--wc-ap-muted: #6b6b6b;

	margin: 22px 0;
	font-family: inherit;
}

.wc-ap-heading {
	font-size: 16px;
	font-weight: 700;
	color: var(--wc-ap-text);
	margin: 0 0 12px;
	letter-spacing: 0.2px;
}

.wc-ap-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wc-ap-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	border: 1.5px solid var(--wc-ap-border);
	border-radius: 12px;
	padding: 14px 16px;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wc-ap-option:hover {
	border-color: var(--wc-ap-primary);
}

.wc-ap-option.wc-ap-active {
	border-color: var(--wc-ap-primary);
	background: var(--wc-ap-primary-light);
	box-shadow: 0 2px 10px rgba(168, 106, 69, 0.12);
}

.wc-ap-option input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	min-width: 20px;
	border: 2px solid #c9c2b8;
	border-radius: 50%;
	margin: 0;
	position: relative;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.wc-ap-option input[type="radio"]:checked {
	border-color: var(--wc-ap-primary);
}

.wc-ap-option input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wc-ap-primary);
}

.wc-ap-option-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.wc-ap-option-title {
	font-weight: 600;
	font-size: 14.5px;
	color: var(--wc-ap-text);
}

.wc-ap-option-sub {
	font-size: 12.5px;
	color: var(--wc-ap-muted);
}

.wc-ap-option-price {
	flex: 0 0 auto;
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}

.wc-ap-price-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wc-ap-muted);
}

.wc-ap-price-value {
	font-size: 17px;
	font-weight: 700;
	color: var(--wc-ap-primary);
	white-space: nowrap;
}

.wc-ap-remaining {
	font-size: 11.5px;
	color: var(--wc-ap-muted);
	white-space: nowrap;
}

.wc-ap-remaining strong {
	color: var(--wc-ap-text);
}

.wc-ap-note {
	margin-top: 10px;
	font-size: 12.5px;
	color: #b45309;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 8px;
	padding: 8px 12px;
}

.wc-ap-buy-now-btn {
	margin-top: 10px;
	width: 100%;
	background: var(--wc-ap-primary, #a86a45) !important;
	border-color: var(--wc-ap-primary, #a86a45) !important;
	color: #fff !important;
}

.wc-ap-buy-now-btn:hover {
	filter: brightness(0.92);
}

.wc-ap-buy-now-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.wc-ap-buy-now-error {
	margin-top: 8px;
	color: #b91c1c;
	font-size: 13px;
}

/* Checkout breakdown rows */
.wc-ap-checkout-row th,
.wc-ap-checkout-row td {
	border-top: 1px dashed #e0e0e0;
}

/* Mobile */
@media (max-width: 480px) {
	.wc-ap-option {
		flex-wrap: wrap;
		gap: 8px;
	}
	.wc-ap-option-price {
		width: 100%;
		align-items: flex-start;
		text-align: left;
		padding-left: 34px;
	}
	.wc-ap-price-value {
		font-size: 16px;
	}
}
