/* CODMaster BD — advance-gate payment UI (SSLCommerz-style,
 * v1.0.13 patch). Shared by the WooCommerce checkout box
 * (server-rendered), the quick-order modal and the landing forms
 * (both JS-built) — same classes everywhere, so all three paths
 * look and behave the same. */

/* The advance box itself. */
.codmaster-advance-box {
	border: 1px solid #e11d74;
	border-radius: 8px;
	padding: 12px;
	margin: 12px 0;
	background: #fff5f8;
}

/* Method tabs: one tab per offered method, each with its brand
 * mark. The radio inside is what the server reads; the label is
 * the visible tab. */
.codmaster-pay-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0;
}

.codmaster-pay-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px 12px;
	cursor: pointer;
	background: #fff;
}

.codmaster-pay-tab input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.codmaster-pay-tab--active {
	border-color: #e11d74;
	background: #fff0f6;
}

/* Active tab in the SELECTED method's own brand colour (user
 * 2026-12-01 14:50: Nagad's tab must be orange, not pink) — the
 * tab carries data-method, set by the server render and by the
 * JS tab switchers. */
.codmaster-pay-tab--active[data-method="bkash"] { border-color: #e2136e; background: #fff0f6; }
.codmaster-pay-tab--active[data-method="nagad"] { border-color: #f6921e; background: #fff8f0; }
.codmaster-pay-tab--active[data-method="rocket"] { border-color: #8c3494; background: #faf5fc; }
.codmaster-pay-tab--active[data-method="bangla_qr"] { border-color: #0b7a4b; background: #f0faf5; }

/* Brand marks: coloured text badges (brand colours, our own
 * marks — no trademarked logo files are copied). */
.codmaster-pay-logo {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	color: #fff;
	font-weight: 700;
	font-size: 13px;
}

.codmaster-pay-logo--bkash { background: #e2136e; }
.codmaster-pay-logo--nagad { background: #f6921e; }
.codmaster-pay-logo--rocket { background: #8c3494; }
.codmaster-pay-logo--bangla_qr { background: #0b7a4b; }

/* One card per method — each method's card carries its own
 * brand accent (top border + tinted background), so the four
 * pages look distinct the way SSLCommerz's per-method pages do. */
.codmaster-adv-panel {
	border: 1px solid #eee;
	border-top: 4px solid #ccc;
	border-radius: 8px;
	padding: 12px;
	background: #fff;
	margin: 8px 0;
}

.codmaster-adv-panel--bkash { border-top-color: #e2136e; background: #fff5f8; }
.codmaster-adv-panel--nagad { border-top-color: #f6921e; background: #fff8f0; }
.codmaster-adv-panel--rocket { border-top-color: #8c3494; background: #faf5fc; }
.codmaster-adv-panel--bangla_qr { border-top-color: #0b7a4b; background: #f0faf5; }

/* Per-method step guide ("যেভাবে পাঠাবেন"): what to do in the
 * customer's own payment app. Guide text only — never a PIN /
 * OTP input on our page. */
.codmaster-steps-title {
	font-weight: 700;
	margin: 10px 0 4px;
}

.codmaster-method-steps {
	margin: 4px 0 8px 20px;
}

/* Two screens (user 2026-12-01 15:02): screen 1 = the
 * customer's paying number first; screen 2 = our number +
 * steps + optional TrxID + "আমি টাকা পাঠিয়েছি". */
.codmaster-pay-screen {
	margin: 4px 0;
}

/* "পরবর্তী" — screen 1's continue button (brand pink; the
 * selected method's colour comes from .codmaster-pay-btn only
 * on screen 2). */
.codmaster-next-btn {
	display: block;
	width: 100%;
	font-size: 17px;
	font-weight: 700;
	padding: 12px;
	margin-top: 10px;
	background: #e11d74;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
}

/* Back to screen 1 (method change) — a quiet text button. */
.codmaster-back-btn {
	background: none;
	border: none;
	padding: 0;
	margin: 0 0 8px;
	color: #555;
	font-size: 14px;
	cursor: pointer;
	text-decoration: underline;
}

/* Inline error for the screen-1 check (bad number / last-4). */
.codmaster-screen-error {
	color: #dc3232;
	font-weight: 700;
	margin: 8px 0;
}

/* The customer's paying number (screen 1) + the Bangla QR
 * last-4 digits (screen 1, QR only). */
.codmaster-paynum-row {
	margin: 10px 0;
}

.codmaster-last4-row {
	margin: 10px 0;
}

.codmaster-paynum-row input,
.codmaster-last4-row input {
	width: 100%;
	max-width: 220px;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 16px;
}

/* Bangla QR card. */
.codmaster-qr-img {
	max-width: 220px;
	width: 100%;
	height: auto;
	display: block;
	margin: 8px 0;
}

/* QR download: a big, full-width button RIGHT under the QR image
 * (the customer downloads the QR on one phone to pay from their
 * own bKash on that same phone) — never a small text link hidden
 * in a menu. No copy button on the QR card (user 2026-12-01
 * 14:55) — download only. */
.codmaster-qr-download {
	display: block;
	width: 100%;
	text-align: center;
	font-size: 17px;
	font-weight: 700;
	padding: 12px;
	margin: 10px 0 6px;
	background: #e11d74;
	color: #fff;
	border-radius: 8px;
	text-decoration: none;
}

.codmaster-scan-steps {
	margin: 8px 0 8px 20px;
}

/* Manual payment number at the TOP of each option card (user
 * 2026-12-01 13:59): unlike SSLCommerz's hosted flow our number
 * is NOT automatic — the customer copies it and pastes it in
 * their bKash / Nagad / Rocket app. Label + number + Copy button,
 * prominent, first thing in the card. */
.codmaster-pay-number {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	margin: 0 0 8px;
}

.codmaster-pay-number-label {
	font-weight: 700;
}

.codmaster-pay-number strong {
	font-size: 17px;
}

.codmaster-num-copy {
	padding: 6px 14px;
	background: #e11d74;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 700;
}

/* Copy button in the visible panel's own brand colour. */
.codmaster-adv-panel--bkash .codmaster-num-copy { background: #e2136e; }
.codmaster-adv-panel--nagad .codmaster-num-copy { background: #f6921e; }
.codmaster-adv-panel--rocket .codmaster-num-copy { background: #8c3494; }
.codmaster-adv-panel--bangla_qr .codmaster-num-copy { background: #0b7a4b; }

.codmaster-num-copy.codmaster-copied {
	background: #46b450;
}

/* "আমি টাকা পাঠিয়েছি" — the action button at the end of
 * screen 2 (user 2026-12-01 15:02). It replaces the old Pay
 * button; there is no Pay button on screen 2. */
.codmaster-pay-btn {
	display: block;
	width: 100%;
	font-size: 18px;
	padding: 12px;
	margin-top: 10px;
	background: #e11d74;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
}

/* "আমি টাকা পাঠিয়েছি" button in the SELECTED method's own
 * brand colour (user 2026-12-01 14:50: Nagad's button must be
 * orange #f6921e, not pink). The box / landing advance step
 * carries data-method, updated by the JS tab switchers on every
 * change. */
.codmaster-advance-box[data-method="bkash"] .codmaster-pay-btn,
.codmaster-advance-step[data-method="bkash"] .codmaster-pay-btn { background: #e2136e; }
.codmaster-advance-box[data-method="nagad"] .codmaster-pay-btn,
.codmaster-advance-step[data-method="nagad"] .codmaster-pay-btn { background: #f6921e; }
.codmaster-advance-box[data-method="rocket"] .codmaster-pay-btn,
.codmaster-advance-step[data-method="rocket"] .codmaster-pay-btn { background: #8c3494; }
.codmaster-advance-box[data-method="bangla_qr"] .codmaster-pay-btn,
.codmaster-advance-step[data-method="bangla_qr"] .codmaster-pay-btn { background: #0b7a4b; }

/* Order-success screen on the thank-you page. */
.codmaster-pay-success {
	border: 1px solid #46b450;
	background: #f0f9f1;
	border-radius: 8px;
	padding: 14px;
	margin: 14px 0;
}

/* Waiting screen on the thank-you page: the customer waits
 * while the server polls for the payment SMS. ONLY the
 * verifying text + the countdown (user 2026-12-01 15:02) —
 * the "আমি টাকা পাঠিয়েছি" button lives on screen 2, before
 * the order is placed, so there is no button here. */
.codmaster-pay-wait {
	border: 1px solid #f6921e;
	background: #fff8f0;
	border-radius: 8px;
	padding: 14px;
	margin: 14px 0;
	text-align: center;
}

.codmaster-wait-timer {
	font-size: 28px;
	font-weight: 700;
}

/* Pending screen after the wait times out: the order stays a
 * draft for manual verification. */
.codmaster-pay-pending {
	border: 1px solid #dc3232;
	background: #fef7f7;
	border-radius: 8px;
	padding: 14px;
	margin: 14px 0;
}
