/**
 * AURAS Pay Checkout Styles
 *
 * @package AurasPay
 */

/* ── Checkout card-based token selector ── */

.wc_payment_method.payment_method_auras_pay label img {
	display: none !important;
}

.payment_method_auras_pay .payment_box > p,
.payment_method_auras_pay .payment_box > div > p:first-child {
	display: none !important;
}

/* Outer wrapper */
.auras-pay-checkout-wrap {
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid #e8eaf0;
	padding: 0;
	margin: 10px 0 4px;
	overflow: hidden;
}

/* Header */
.auras-pay-checkout-header {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #0a0a0a;
	padding: 12px 18px;
}

.auras-pay-checkout-logo {
	height: 22px;
	width: auto;
	max-width: 90px;
	object-fit: contain;
}

.auras-pay-checkout-tagline {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.75);
	letter-spacing: 0.3px;
}

/* Select label */
.auras-pay-select-label {
	font-size: 12px;
	font-weight: 600;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin: 14px 16px 10px;
}

/* Token card grid */
.auras-pay-token-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 8px;
	padding: 0 14px 14px;
}

/* Individual token card */
.auras-pay-token-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 8px 10px;
	background: #f8fafc;
	border: 2px solid #e2e8f0;
	border-radius: 14px;
	cursor: pointer;
	transition: border-color 0.18s, background 0.18s, transform 0.12s, box-shadow 0.18s;
	text-align: center;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.auras-pay-token-card:hover {
	border-color: #a5b4fc;
	background: #f5f3ff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.auras-pay-token-card.is-selected {
	border-color: #6366f1;
	background: #eef2ff;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Checkmark badge */
.auras-pay-card-check {
	position: absolute;
	top: 7px;
	right: 7px;
	width: 18px;
	height: 18px;
	background: #6366f1;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	flex-shrink: 0;
}

.auras-pay-token-card.is-selected .auras-pay-card-check {
	display: flex;
}

/* Coin logo */
.auras-pay-card-icon {
	width: 40px;
	height: 40px;
	object-fit: contain;
	display: block;
}

.auras-pay-card-icon-fallback {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 700;
	color: #475569;
}

/* Coin ticker */
.auras-pay-card-ticker {
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	letter-spacing: 0.2px;
}

.auras-pay-token-card.is-selected .auras-pay-card-ticker {
	color: #4338ca;
}

/* Network badge */
.auras-pay-card-network {
	font-size: 10px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 20px;
	white-space: nowrap;
	line-height: 1.5;
}

/* Selected summary pill */
.auras-pay-selected-summary {
	display: none;
	align-items: center;
	gap: 6px;
	margin: 0 14px 14px;
	padding: 8px 14px;
	background: #eef2ff;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	color: #4338ca;
}

.auras-pay-selected-summary.is-visible {
	display: flex;
}

/* Legacy selectors kept for blocks / fallback compatibility */
.auras-pay-token-selector { display: none; }
.auras-pay-branding { display: none; }


/* Payment Container */
.auras-pay-payment-container {
	width: 100%;
	margin: 0;
	padding: 0;
	background: #ffffff;
	border-radius: 0;
	box-shadow: none;
	overflow: hidden;
}

.auras-pay-payment-header {
	background: #000000;
	padding: 16px 24px;
	margin: 0;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.auras-pay-back-button {
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	color: #ffffff;
}

.auras-pay-back-button:hover {
	background: rgba(255, 255, 255, 0.2);
}

.auras-pay-back-button svg {
	stroke: #ffffff;
}

.auras-pay-header-logo {
	display: flex;
	align-items: center;
	justify-content: center;
}

.auras-pay-header-logo img {
	height: 80px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
}

.auras-pay-order-info {
	display: none; /* replaced by receipt bar */
}

/* Payment Details card — no longer used, kept for reference */
.auras-pay-payment-details {
	display: none;
}

.auras-pay-details-row {
	display: none;
}

.auras-pay-amount-section {
	display: none;
}

.auras-pay-amount-label {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 12px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
}

.auras-pay-amount-value {
	font-size: 32px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 8px;
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.auras-pay-crypto-amount {
	color: #ffffff;
}

.auras-pay-crypto-symbol {
	color: rgba(255, 255, 255, 0.8);
	font-size: 20px;
}

.auras-pay-fiat-amount {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 500;
}

/* Timer Section */
.auras-pay-timer-section {
	text-align: right;
	flex-shrink: 0;
}

.auras-pay-timer-label {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 8px;
	font-weight: 500;
}

.auras-pay-timer {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	padding: 10px 18px;
	backdrop-filter: blur(10px);
}

.auras-pay-timer-value {
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
	font-family: 'Courier New', monospace;
	letter-spacing: 1px;
}

.auras-pay-timer-warning {
	background: rgba(245, 158, 11, 0.2);
	border-color: rgba(245, 158, 11, 0.4);
}

.auras-pay-timer-warning .auras-pay-timer-value {
	color: #fbbf24;
}

.auras-pay-timer-critical {
	background: rgba(239, 68, 68, 0.2);
	border-color: rgba(239, 68, 68, 0.4);
	animation: pulse 1s infinite;
}

.auras-pay-timer-critical .auras-pay-timer-value {
	color: #fca5a5;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.auras-pay-timer-note {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	margin-top: 6px;
}

/* QR Code Section */
.auras-pay-qr-section {
	text-align: center;
	margin-bottom: 24px;
}

.auras-pay-qr-section h3 {
	font-size: 16px;
	color: #64748b;
	margin: 0 0 16px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.auras-pay-qr-code {
	background: #ffffff;
	border: none;
	border-radius: 20px;
	padding: 24px;
	display: inline-block;
	margin-bottom: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.auras-pay-qr-code img {
	display: block;
	max-width: 260px;
	height: auto;
	border-radius: 12px;
}

.auras-pay-qr-placeholder {
	width: 280px;
	height: 280px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8fafc;
	color: #94a3b8;
}

.auras-pay-qr-instruction {
	font-size: 14px;
	color: #64748b;
	max-width: 400px;
	margin: 0 auto;
}

/* Divider */
.auras-pay-divider {
	text-align: center;
	margin: 30px 0;
	position: relative;
}

.auras-pay-divider::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background: #e2e8f0;
}

.auras-pay-divider span {
	position: relative;
	background: #fff;
	padding: 0 16px;
	color: #94a3b8;
	font-size: 14px;
	font-weight: 500;
}

/* ── Inline payment iframe ── */

.auras-pay-iframe-wrapper {
	margin: 0;
	border-radius: 0;
	overflow: hidden;
	border: none;
	background: #f8fafc;
}

.auras-pay-payment-iframe {
	display: block;
	width: 100%;
	height: 80vh;
	min-height: 560px;
	border: none;
	background: #f8fafc;
}

.auras-pay-error-box {
	padding: 32px 24px;
	background: #fef2f2;
	border-bottom: 1px solid #fecaca;
	color: #ef4444;
	font-size: 14px;
	text-align: center;
}

/* ── Crypto amount preview pill (checkout) ── */

.auras-pay-amount-preview {
	margin: 0 18px 14px;
	padding: 10px 16px;
	border-radius: 10px;
	background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
	border: 1px solid #ddd6fe;
	font-size: 15px;
	font-weight: 700;
	color: #4f46e5;
	text-align: center;
	letter-spacing: 0.2px;
	transition: background 0.2s, color 0.2s;
}

.auras-pay-amount-preview.is-loading {
	color: #94a3b8;
	font-weight: 400;
	font-size: 13px;
	background: #f8fafc;
	border-color: #e2e8f0;
	animation: auras-pulse 1.2s ease-in-out infinite;
}

.auras-pay-amount-preview.is-error {
	color: #ef4444;
	background: #fff1f2;
	border-color: #fecdd3;
	font-weight: 400;
	font-size: 13px;
}

@keyframes auras-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0.5; }
}

/* ── Receipt bar (order summary + live status + timer, below iframe) ── */

.auras-pay-receipt-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 20px;
	background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
	flex-wrap: wrap;
}

/* Left column: order number + amounts */
.auras-pay-receipt-left {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.auras-pay-receipt-order {
	font-size: 11px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.7);
	white-space: nowrap;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.auras-pay-receipt-amount {
	display: flex;
	align-items: baseline;
	gap: 5px;
	flex-wrap: wrap;
}

.auras-pay-receipt-amount .auras-pay-crypto-amount {
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
}

.auras-pay-receipt-amount .auras-pay-crypto-symbol {
	font-size: 14px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.8);
}

.auras-pay-receipt-sep {
	color: rgba(255, 255, 255, 0.4);
	font-size: 14px;
}

.auras-pay-receipt-fiat {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.85);
}

.auras-pay-network-pill {
	background: rgba(255, 255, 255, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 20px;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 600;
	color: #ffffff;
	white-space: nowrap;
}

/* Live status chip */
.auras-pay-receipt-status {
	display: flex;
	align-items: center;
	gap: 7px;
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 20px;
	padding: 5px 14px;
	white-space: nowrap;
	flex-shrink: 0;
}

.auras-pay-receipt-status-text {
	font-size: 12px;
	font-weight: 600;
	color: #ffffff;
}

.auras-pay-receipt-status.status-completed {
	background: rgba(16, 185, 129, 0.25);
	border-color: rgba(16, 185, 129, 0.5);
}

.auras-pay-receipt-status.status-failed,
.auras-pay-receipt-status.status-expired {
	background: rgba(239, 68, 68, 0.25);
	border-color: rgba(239, 68, 68, 0.5);
}

/* Spinning dot */
.auras-pay-receipt-spinner {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	animation: auras-receipt-spin 0.8s linear infinite;
	flex-shrink: 0;
}

.status-completed .auras-pay-receipt-spinner,
.status-failed .auras-pay-receipt-spinner,
.status-expired .auras-pay-receipt-spinner {
	animation: none;
	border: none;
	width: 0;
	height: 0;
}

@keyframes auras-receipt-spin {
	to { transform: rotate(360deg); }
}

.auras-pay-receipt-timer {
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 10px;
	padding: 6px 14px;
	white-space: nowrap;
	transition: background 0.3s, border-color 0.3s;
}

.auras-pay-receipt-timer svg {
	color: rgba(255, 255, 255, 0.8);
	flex-shrink: 0;
}

.auras-pay-receipt-timer .auras-pay-timer-value {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	font-family: 'Courier New', monospace;
	letter-spacing: 1px;
}

.auras-pay-receipt-timer-label {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.75);
}

.auras-pay-receipt-timer.auras-pay-timer-warning {
	background: rgba(245, 158, 11, 0.25);
	border-color: rgba(245, 158, 11, 0.5);
}

.auras-pay-receipt-timer.auras-pay-timer-warning .auras-pay-timer-value {
	color: #fde68a;
}

.auras-pay-receipt-timer.auras-pay-timer-critical {
	background: rgba(239, 68, 68, 0.25);
	border-color: rgba(239, 68, 68, 0.5);
	animation: pulse 1s infinite;
}

.auras-pay-receipt-timer.auras-pay-timer-critical .auras-pay-timer-value {
	color: #fca5a5;
}

/* Wallet Button */
.auras-pay-wallet-section {
	text-align: center;
	margin-bottom: 24px;
}

.auras-pay-wallet-section h3 {
	display: none;
}

.auras-pay-wallet-hint {
	font-size: 12px;
	color: #aaa;
	margin: 10px 0 0;
	text-align: center;
}

.auras-pay-wallet-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: #000000;
	color: #ffffff;
	padding: 18px 48px;
	border-radius: 16px;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.2s;
	width: 100%;
	max-width: 400px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.auras-pay-wallet-button:hover {
	background: #1a1a1a;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	color: #ffffff;
}

.auras-pay-wallet-button svg {
	width: 24px;
	height: 24px;
}

/* Status Section */
.auras-pay-status-section {
	margin: 0;
}

.auras-pay-status {
	text-align: center;
	padding: 32px 24px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.auras-pay-status-icon {
	margin-bottom: 16px;
}

.auras-pay-spinner {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.auras-pay-status-text {
	font-size: 18px;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 6px;
}

.auras-pay-status-subtext {
	font-size: 13px;
	color: #64748b;
	line-height: 1.5;
}

.auras-pay-success-text {
	color: #10b981;
}

.auras-pay-error-text {
	color: #ef4444;
}

.auras-pay-warning-text {
	color: #f59e0b;
}

/* Instructions */
.auras-pay-instructions {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 20px 24px;
	margin-bottom: 20px;
}

.auras-pay-instructions h4 {
	font-size: 15px;
	color: #1e293b;
	margin: 0 0 14px;
	font-weight: 600;
}

.auras-pay-instructions ol {
	margin: 0;
	padding-left: 22px;
}

.auras-pay-instructions li {
	color: #64748b;
	margin-bottom: 10px;
	line-height: 1.6;
	font-size: 14px;
}

/* Support */
.auras-pay-support {
	text-align: center;
	padding: 16px;
	color: #94a3b8;
	font-size: 13px;
}

.auras-pay-support a {
	color: #6366f1;
	text-decoration: none;
	font-weight: 600;
}

.auras-pay-support a:hover {
	text-decoration: underline;
}

.auras-pay-qr-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #64748b;
	text-decoration: none;
	font-size: 14px;
	margin-top: 12px;
	font-weight: 500;
}

.auras-pay-qr-link:hover {
	color: #1e293b;
}

.auras-pay-powered-by {
	text-align: center;
	padding: 12px 24px;
	border-top: 1px solid #e2e8f0;
	font-size: 12px;
	color: #94a3b8;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #ffffff;
}

/* Network Badge */
.auras-pay-network-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	padding: 8px 14px;
	margin-top: 12px;
	backdrop-filter: blur(10px);
}

.auras-pay-network-badge svg,
.auras-pay-network-badge img {
	width: 20px;
	height: 20px;
}

.auras-pay-network-name {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.9);
	font-weight: 500;
}

/* Connected Wallet Info */
.auras-pay-wallet-info {
	background: #f8fafc;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.auras-pay-wallet-address {
	flex: 1;
	font-family: 'Courier New', monospace;
	font-size: 13px;
	color: #475569;
	overflow: hidden;
	text-overflow: ellipsis;
}

.auras-pay-copy-button {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px 12px;
	cursor: pointer;
	transition: all 0.2s;
}

.auras-pay-copy-button:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
}

/* Responsive */
@media (max-width: 640px) {
	.auras-pay-payment-iframe {
		height: 65vh;
		min-height: 420px;
	}

	.auras-pay-receipt-bar {
		gap: 10px;
		padding: 12px 16px;
	}

	.auras-pay-receipt-amount {
		font-size: 14px;
	}

	.auras-pay-receipt-amount .auras-pay-crypto-amount {
		font-size: 16px;
	}

	.auras-pay-token-select {
		font-size: 14px;
	}
}
