/*
 * Scoped to this gateway's own markup only -- never touches global theme
 * elements. One narrow, deliberate exception: .wcmc-copy-btn's own
 * font-size/padding use !important, because themes commonly apply large,
 * heavily-padded styling to every .button on the page at a specificity
 * this small inline button can't reliably out-rank otherwise, which is
 * what made the copy buttons render oversized next to the address/amount
 * text they sit beside. Color/background/border are still left to the
 * theme (no !important there) -- only sizing is pinned down.
 */

.wcmc-test-mode-notice {
	color: #b32d2e;
}

/*
 * The post-order "Choose Your Payment Method" screen: one card per
 * enabled payment option, each its own <form> posting straight to
 * admin-post.php (see Display\OrderSnapshotRenderer::renderOptionCard()).
 * No amount/address/QR/timer here -- just the coin, its network badge,
 * and a Select button.
 */
.wcmc-option-cards {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
	gap: 1em;
	margin: 1em 0;
}

.wcmc-option-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.5em;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 1.25em 1em;
	background: #fff;
}

.wcmc-option-card-icon {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.wcmc-option-card-title {
	font-weight: 600;
	font-size: 1.05em;
}

/*
 * The small network badge is what tells USDT-TRC20 apart from USDT-ERC20
 * (same coin icon, different network) -- deliberately smaller/quieter
 * than the coin title so the icon+title read as the primary identity and
 * the network reads as a qualifier, not a second coin.
 */
.wcmc-option-card-network {
	display: inline-block;
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #555;
	background: #f0f0f1;
	border-radius: 4px;
	padding: 0.15em 0.6em;
}

.wcmc-option-card-select {
	margin-top: auto;
	cursor: pointer;
}

.wcmc-picker-total {
	font-size: 1.05em;
	margin-bottom: 1em;
}

/*
 * The estimated amount of THIS option's own crypto asset (e.g.
 * "≈ 0.00234502 BTC"), computed live but not locked -- see
 * Display\OrderSnapshotRenderer::estimatedPriceLine(). Falls back to the
 * plain fiat order total (see .wcmc-picker-total) for an option with no
 * Rate Asset configured, or if a live rate can't be fetched right now.
 */
.wcmc-option-card-price {
	display: inline-block;
	font-weight: 700;
	font-size: 1.05em;
	margin: 0;
	padding: 0.3em 0.7em;
	border-radius: 4px;
	background: #eafaf0;
	color: #0f7b4a;
	overflow-wrap: anywhere;
}

.wcmc-option-card-price-note {
	font-size: 0.75em;
	color: #777;
	margin: 0;
}

/*
 * Mirrors .wcmc-quote-breakdown (shown on the final payment page after
 * selection) but compact, for the tighter card width -- only the
 * discount % and discounted fiat value, since the plain order total is
 * already shown once at the top of the picker (.wcmc-picker-total).
 */
.wcmc-option-card-breakdown {
	color: #555;
	font-size: 0.8em;
	width: 100%;
}

.wcmc-option-card-breakdown p {
	margin: 0.15em 0;
}

.wcmc-picker-error {
	color: #b32d2e;
	font-weight: 600;
}

/*
 * The optional gateway-wide logo (Payment Method Logo admin setting).
 * Classic Checkout renders it via WooCommerce's own default $this->icon
 * <img> markup (Checkout\Gateway::resolveIconUrl()), which these rules
 * also apply to since WooCommerce wraps it with no class of its own
 * beyond what themes add; Checkout Blocks renders it explicitly via
 * blocks/checkout.js's Label() component, which carries these classes.
 */
.wcmc-gateway-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.wcmc-gateway-icon {
	max-height: 24px;
	max-width: 48px;
	object-fit: contain;
}

.wcmc-network-badge {
	margin-top: 0;
}

.wcmc-qr {
	display: block;
	width: 100px;
	height: 100px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	margin-bottom: 0.75em;
}

.wcmc-address code {
	word-break: break-all;
	overflow-wrap: anywhere;
	background: #f6f6f6;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 0.35em 0.5em;
	display: inline-block;
	max-width: 100%;
	font-weight: 700;
}

/*
 * The "button" class (added alongside this one in both render paths)
 * supplies the theme's color/background/border so the button still looks
 * themed -- but many themes apply large, uppercase, heavily-padded
 * styling to every .button on the page, which makes a small inline copy
 * button look oversized next to the address/amount text it sits beside.
 * These overrides keep it compact regardless of the theme's base button
 * styling, without fighting color/background (still inherited).
 */
.wcmc-copy-btn {
	cursor: pointer;
	margin-left: 0.4em;
	vertical-align: middle;
	font-size: 0.8em !important;
	padding: 0.45em 0.9em !important;
	line-height: 1.2 !important;
	min-height: 0 !important;
}

.wcmc-copy-btn:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.wcmc-order-snapshot {
	max-width: 100%;
	overflow-wrap: anywhere;
}

.wcmc-snapshot-title {
	margin-top: 0;
}

.wcmc-quote-breakdown {
	color: #555;
	font-size: 0.95em;
	margin-bottom: 0.5em;
}

.wcmc-quote-breakdown p {
	margin: 0.2em 0;
}

.wcmc-quote-amount-label,
.wcmc-address-label {
	margin-bottom: 0.15em;
	font-weight: 600;
}

.wcmc-quote-amount {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6em;
	font-size: 1.3em;
	background: #eafaf0;
	border: 1px solid #b9e8cd;
	border-radius: 6px;
	padding: 0.6em 0.9em;
	margin: 0.3em 0 0.5em;
}

.wcmc-quote-amount strong {
	color: #0f7b4a;
}

.wcmc-quote-timer {
	font-weight: 600;
}

.wcmc-quote-expired-notice {
	background: #fbeaea;
	border: 1px solid #e0b4b4;
	border-radius: 4px;
	padding: 0.75em 1em;
}

.wcmc-quote-expired-heading {
	color: #b32d2e;
}

/*
 * Editable via the "Checkout Message" admin setting -- wraps wpautop()'s
 * own <p> tags (one or more paragraphs), so italics are applied here via
 * CSS rather than a literal <em> tag (which cannot legally wrap <p>).
 */
.wcmc-manual-notice {
	color: #b32d2e;
	font-style: italic;
}

.wcmc-manual-notice p {
	margin: 0.3em 0;
}

/*
 * Optional "buy crypto with a card" note (Buy Crypto Help admin
 * setting), shown on both the picker screen and the final payment page.
 * A short list of plain outbound links to well-known third-party
 * onramp services (see OrderSnapshotRenderer::BUY_CRYPTO_PROVIDERS) --
 * never a third-party embed/iframe/widget of any kind.
 */
.wcmc-print-summary-link {
	margin-top: 1em;
}

.wcmc-print-summary-link a {
	display: inline-block;
	font-weight: 700;
	color: #6b3fa0;
	background: #f5f0fb;
	border: 1px solid #d9c8ef;
	border-radius: 6px;
	padding: 0.6em 1em;
	text-decoration: none;
}

.wcmc-print-summary-link a:hover,
.wcmc-print-summary-link a:focus-visible {
	text-decoration: underline;
}

.wcmc-buy-crypto-help {
	background: #f0f6fc;
	border: 1px solid #c8dcef;
	border-radius: 6px;
	padding: 1em;
	margin-top: 1.5em;
}

.wcmc-buy-crypto-help p {
	margin: 0.3em 0;
}

.wcmc-buy-crypto-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1.5em;
	margin: 0.5em 0;
	padding: 0;
	list-style: none;
}

.wcmc-buy-crypto-list a {
	font-weight: 600;
}

.wcmc-buy-crypto-disclaimer {
	font-size: 0.8em;
	color: #666;
}

@media ( max-width: 480px ) {
	.wcmc-qr {
		width: 75px;
		height: 75px;
	}
}

/*
 * Hides the "Print" button added by a separate, unrelated invoice/print
 * plugin (markup confirmed as `<p class="order-print"><a class="button
 * print">`) on the checkout/order-received/My Account pages this
 * stylesheet loads on. Requested explicitly by the site owner: that
 * button's own print output doesn't include this gateway's crypto
 * payment details (it renders its own template, outside this plugin's
 * control -- see the "Print Crypto Payment and Order Details" link this plugin
 * adds instead), and was confusing customers. If that other plugin
 * changes its markup/class names in a future update, this rule will
 * stop matching and may need updating.
 */
.order-print {
	display: none;
}
