/**
 * SPC Checkout — Gateway tabs and payment form styling.
 */

/* Gateway tabs container */
.rmkr-spc-gateway-tabs {
	display: flex;
	gap: 0;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 20px;
}

/* Individual tab */
button.rmkr-spc-gateway-tab {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 8px;
	border: none;
	border-right: 1px solid #ddd;
	background: #f7f7f7 !important;
	cursor: pointer;
	transition: background-color 0.2s, box-shadow 0.2s;
	font-size: 13px;
	color: #666 !important;
}

button.rmkr-spc-gateway-tab:last-child {
	border-right: none;
}

button.rmkr-spc-gateway-tab:hover {
	background: #eef4fa !important;
	color: #333 !important;
}

button.rmkr-spc-gateway-tab.rmkr-spc-gateway-tab--active,
button.rmkr-spc-gateway-tab.rmkr-spc-gateway-tab--active:hover {
	background: #fff !important;
	color: #333 !important;
	font-weight: 600;
	box-shadow: inset 0 -3px 0 #0073aa;
}

.rmkr-spc-gateway-tab img {
	max-height: 24px;
	width: auto;
}

/* Gateway label above CC fields */
.rmkr-spc-gateway-label {
	font-size: 14px;
	font-weight: 600;
	color: #555;
	padding: 10px 0;
	margin-bottom: 5px;
	border-bottom: 1px solid #e8e8e8;
}

/* PayPal description styling */
.mepr-payment-method-desc-text.spc > p {
	text-align: center;
	padding: 30px 20px;
	margin: 0;
	color: #555;
	font-size: 16px;
}

/* ----------------------------------------
   Responsive — Tablets (768px and below)
   ---------------------------------------- */
@media screen and (max-width: 768px) {

	/* Stack tabs into 2x2 grid */
	.rmkr-spc-gateway-tabs {
		flex-wrap: wrap;
	}

	button.rmkr-spc-gateway-tab {
		flex: 1 1 45%;
		border-right: 1px solid #ddd;
		border-bottom: 1px solid #ddd;
		font-size: 12px;
		padding: 10px 6px;
	}

	/* Remove right border on even tabs */
	button.rmkr-spc-gateway-tab:nth-child(2n) {
		border-right: none;
	}

	/* Remove bottom border on last row */
	button.rmkr-spc-gateway-tab:nth-last-child(-n+2) {
		border-bottom: none;
	}

	/* CC fields: stack label above input */
	.mepr-payment-methods-wrapper .mepr-checkout-form.spc .mp-form-row {
		display: block;
	}

	.mepr-payment-methods-wrapper .mepr-checkout-form.spc .mp-form-label {
		display: block;
		text-align: left;
		padding-right: 0;
		margin-bottom: 5px;
	}

	.mepr-payment-methods-wrapper .mepr-checkout-form.spc input.mepr-form-input {
		width: 100% !important;
	}

	/* Hide card brand icons inside CC input — they overlap on small screens */
	.mepr-checkout-form.spc .cc-number.mepr-cards {
		background-image: none !important;
	}
}

/* ----------------------------------------
   Responsive — Mobile (480px and below)
   ---------------------------------------- */
@media screen and (max-width: 480px) {

	/* Stack tabs vertically */
	.rmkr-spc-gateway-tabs {
		flex-direction: column;
	}

	button.rmkr-spc-gateway-tab {
		flex: 1 1 auto;
		flex-direction: row;
		justify-content: center;
		gap: 10px;
		border-right: none;
		border-bottom: 1px solid #ddd;
		padding: 10px 12px;
		font-size: 13px;
	}

	button.rmkr-spc-gateway-tab:last-child {
		border-bottom: none;
	}

	.rmkr-spc-gateway-tab img {
		max-height: 20px;
	}

	/* PayPal description */
	.mepr-payment-method-desc-text.spc > p {
		padding: 20px 10px;
		font-size: 14px;
	}
}