/* === Checkout: 首付分期付款 UI === */

.wpbr-di-fields {
	margin-top: 12px;
	padding: 16px;
	background: #fafafa;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
}

.wpbr-di-fields__row {
	margin-bottom: 14px;
}

.wpbr-di-fields__row label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #2d3748;
}

.wpbr-di-fields__row .required {
	color: #b32d2e;
}

.wpbr-di-fields__row select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	background: #fff;
	font-size: 0.95rem;
}

/* ===== 金額預覽區 ===== */
.wpbr-di-summary {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 12px 14px;
	margin: 14px 0;
}

.wpbr-di-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	font-size: 0.92rem;
	color: #4a5568;
}

.wpbr-di-summary__row + .wpbr-di-summary__row {
	border-top: 1px dashed #edf2f7;
}

.wpbr-di-summary__row strong {
	color: #2d3748;
	font-size: 1rem;
}

.wpbr-di-summary__row--highlight {
	background: #fff8e1;
	margin: 4px -14px 0;
	padding: 10px 14px;
	border-top: 2px solid #f4d3a8 !important;
	border-radius: 0 0 6px 6px;
}

.wpbr-di-summary__row--highlight strong {
	color: #c87324;
	font-size: 1.08rem;
}

/* ===== 卡片區 ===== */
.wpbr-di-card {
	margin-top: 14px;
}

.wpbr-di-card > label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #2d3748;
}

.wpbr-di-card__mount {
	min-height: 60px;
	padding: 12px;
	background: #fff;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
}

.wpbr-di-card__hint {
	margin: 8px 0 0;
	font-size: 0.82rem;
	color: #718096;
}

.wpbr-di-card__error {
	margin-top: 8px;
	padding: 8px 12px;
	background: #fff5f5;
	border: 1px solid #fc8181;
	border-radius: 4px;
	color: #c53030;
	font-size: 0.88rem;
}

/* ===== 身分驗證區塊 ===== */
.wpbr-di-id-section {
	margin-top: 18px;
	padding: 16px;
	background: #fffbef;
	border: 1px solid #fde68a;
	border-radius: 8px;
}

.wpbr-di-id-section__title {
	margin: 0 0 12px;
	font-size: 1.05rem;
	color: #92400e;
	font-weight: 700;
}

.wpbr-di-id-section__notice {
	margin-bottom: 14px;
	padding: 10px 12px;
	background: #fff;
	border-left: 3px solid #f59e0b;
	border-radius: 0 6px 6px 0;
	font-size: 0.86rem;
	line-height: 1.6;
	color: #4a5568;
}

.wpbr-di-id-section__notice strong {
	display: block;
	color: #92400e;
	margin-bottom: 6px;
}

.wpbr-di-id-section__notice ul {
	margin: 0;
	padding-left: 18px;
}

.wpbr-di-id-section__notice li {
	margin: 2px 0;
}

.wpbr-di-id-upload-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 14px;
}

@media (max-width: 600px) {
	.wpbr-di-id-upload-row {
		grid-template-columns: 1fr;
	}
}

.wpbr-di-id-upload-slot {
	background: #fff;
	border: 1.5px dashed #d4a574;
	border-radius: 6px;
	padding: 10px;
	text-align: center;
}

.wpbr-di-id-upload-slot[data-state="uploaded"] {
	border-style: solid;
	border-color: #28a745;
	background: #f0fff4;
}

.wpbr-di-id-upload-slot__label {
	font-weight: 600;
	color: #2d3748;
	font-size: 0.88rem;
	margin-bottom: 8px;
}

.wpbr-di-id-upload-btn {
	display: inline-block;
	padding: 7px 14px;
	background: #f59e0b;
	color: #fff !important;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
}

.wpbr-di-id-upload-btn:hover {
	background: #d97706;
}

.wpbr-di-id-upload-btn input[type="file"] {
	display: none;
}

.wpbr-di-id-upload-slot__filename {
	margin-top: 6px;
	font-size: 0.82rem;
	color: #28a745;
	word-break: break-all;
	display: none;
}

.wpbr-di-id-upload-slot[data-state="uploaded"] .wpbr-di-id-upload-slot__filename {
	display: block;
}

.wpbr-di-id-upload-slot--uploading {
	opacity: 0.5;
	pointer-events: none;
}

.wpbr-di-id-upload-slot--uploading .wpbr-di-id-upload-btn span::after {
	content: ' ⏳';
}

#wpbr-di-id-number {
	width: 100%;
	padding: 8px 10px;
	font-size: 1rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 1px;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
}

.wpbr-di-hint {
	display: block;
	margin-top: 4px;
	color: #6b7280;
	font-size: 0.78rem;
}

.wpbr-di-id-section__error {
	margin-top: 10px;
	padding: 10px 14px;
	background: #fff5f5;
	border: 1.5px solid #fc8181;
	border-radius: 6px;
	color: #c53030;
	font-weight: 600;
	font-size: 0.92rem;
}
