/* ==========================================================================
   AGMS Pay Checkout — Stripe-inspired card fields
   v1.4.8
   ========================================================================== */

/* ---------- Gateway icon & brand badges (admin + checkout) ---------- */
.agms-pay-gateway-icons {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	vertical-align: middle;
}

.agms-pay-gateway-icons .agms-pay-logo {
	height: 24px;
	width: auto;
	border-radius: 4px;
	vertical-align: middle;
}

.agms-pay-brand-badges {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	vertical-align: middle;
}

.agms-pay-brand-badges .agms-pay-brand-icon {
	height: 24px;
	width: 38px;
	border-radius: 3px;
}

/* Admin payment providers list — tighten spacing */
.woocommerce .wc-payment-gateway-method-title .agms-pay-gateway-icons,
.wc-settings-payments-provider .agms-pay-gateway-icons {
	margin-left: 6px;
}

/* ---------- Card container ---------- */
#agms-pay-fields,
.agms-pay-block-fields {
	margin-top: 12px;
	padding: 0;
	border: none;
	background: transparent;
}

.agms-pay-card-container {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.agms-pay-card-container:focus-within {
	border-color: #0073e6;
	box-shadow: 0 1px 3px rgba(99, 91, 255, 0.12), 0 0 0 1px rgba(99, 91, 255, 0.2);
}

/* ---------- Card number row (top) ---------- */
.agms-pay-card-row {
	position: relative;
	padding: 0;
	border-bottom: 1px solid #e8e8e8;
}

.agms-pay-card-row:last-child {
	border-bottom: none;
}

.agms-pay-card-row-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-bottom: none;
}

.agms-pay-card-row-split > .agms-pay-card-cell:first-child {
	border-right: 1px solid #e8e8e8;
}

.agms-pay-card-cell {
	position: relative;
}

/* ---------- Labels ---------- */
.agms-pay-card-container label {
	display: block;
	font-size: 12px;
	font-weight: 500;
	color: #6b7280;
	letter-spacing: 0.025em;
	text-transform: uppercase;
	padding: 10px 14px 0;
	margin: 0;
	line-height: 1;
}

/* ---------- Field containers ---------- */
.agms-pay-card-container .agms-pay-field-wrap {
	padding: 4px 14px 10px;
}

/* Collect.js inline field mount points */
.agms-pay-card-container .agms-pay-collect-field {
	width: 100%;
	min-height: 36px;
	border: none;
	border-radius: 0;
	padding: 6px 0;
	margin: 0;
	background: transparent;
	font-size: 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1a1a2e;
	line-height: 1.4;
}

/* Block checkout Collect.js inline fields */
.agms-pay-card-container .agms-pay-collect-field {
	min-height: 36px;
}

.agms-pay-card-container .agms-pay-collect-field iframe {
	min-height: 36px !important;
}

/* ---------- Card brand icons ---------- */
.agms-pay-card-brands {
	display: flex;
	align-items: center;
	gap: 6px;
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	z-index: 2;
}

.agms-pay-card-brands svg {
	width: 32px;
	height: 22px;
	opacity: 0.45;
	transition: opacity 0.25s ease;
}

.agms-pay-card-brands svg:hover {
	opacity: 0.7;
}

/* ---------- Security badge ---------- */
.agms-pay-security-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 10px;
	padding: 0;
	font-size: 12px;
	color: #9ca3af;
	letter-spacing: 0.01em;
	user-select: none;
}

.agms-pay-security-badge svg {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
	opacity: 0.7;
}

/* ---------- Wallet buttons container (Apple Pay / Google Pay) ---------- */
.agms-pay-wallets-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 4px;
}

.agms-pay-wallet-slot {
	min-height: 44px;
	overflow: hidden;
	border-radius: 6px;
}

/* "or pay with card" divider */
.agms-pay-or-divider {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 18px 0 14px;
	color: #9ca3af;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.agms-pay-or-divider::before,
.agms-pay-or-divider::after {
	content: '';
	flex: 1;
	border-bottom: 1px solid #e5e7eb;
}

.agms-pay-or-divider span {
	padding: 0 14px;
	white-space: nowrap;
}

/* ---------- Block checkout description ---------- */
.agms-pay-block-fields .agms-pay-block-description {
	margin: 0 0 14px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.5;
}

/* ---------- Error / notice ---------- */
.agms-pay-card-container .agms-pay-field-error {
	color: #df1b41;
	font-size: 12px;
	padding: 0 14px 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
	.agms-pay-card-row-split {
		grid-template-columns: 1fr;
	}

	.agms-pay-card-row-split > .agms-pay-card-cell:first-child {
		border-right: none;
		border-bottom: 1px solid #e8e8e8;
	}

	.agms-pay-card-brands svg {
		width: 26px;
		height: 18px;
	}
}
