/**
* Simple NiuPay Gateway Plugin Styles
*/

.flex {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

@media (min-width: 992px) {
	.flex {
		flex-direction: row;
	}
}

.col {
	flex: 1;
}

.niupay-gateway-wrapper {
	margin: 30px auto;
	padding: 0;
	width: 100%;
}

.niupay-gateway-wrapper .niupay-gateway-form {
	background: #ffffff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	border: 1px solid #e1e1e1;
}

.niupay-gateway-wrapper .niupay-gateway-form h3 {
	font-size: 20px;
	font-family: "GothamBold";
	letter-spacing: 1px;
	font-weight: normal;
	text-transform: uppercase;
	text-align: center;
	color: var(--accent);
	margin-top: 0.25rem;
	margin-bottom: 2rem;
}

.niupay-gateway-wrapper .form-field {
	flex: 1;
}

.niupay-gateway-wrapper .form-field:first-child {
	margin-bottom: 0;
}
.niupay-gateway-wrapper .form-field:last-child {
	margin-bottom: 20px;
}

@media (min-width: 992px) {
	.niupay-gateway-wrapper .form-field:first-child {
		margin-bottom: 20px;
	}
}

.niupay-gateway-wrapper .form-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	border-radius: 4px;
	padding: 12px;
	text-align: left;
}

.niupay-gateway-wrapper .col:first-child .form-field label {
	padding: 0;
}

@media (min-width: 992px) {
	.niupay-gateway-wrapper .col:first-child .form-field label {
		padding: 12px;
	}
}

.niupay-gateway-wrapper .form-field input[type="text"],
.niupay-gateway-wrapper .form-field input[type="email"],
.niupay-gateway-wrapper .form-field input[type="number"],
.niupay-gateway-wrapper .form-field textarea {
	width: 100%;
	padding: 12px;
	border: 2px solid #e1e1e1;
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.3s ease;
	box-sizing: border-box;
}

.niupay-gateway-wrapper .form-field input:focus,
.niupay-gateway-wrapper .form-field textarea:focus {
	outline: none;
	border-color: #e31837;
}

/* Amount Selection */
.niupay-gateway-wrapper .amount-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 15px;
}

.niupay-gateway-wrapper .amount-option {
	display: block;
	padding: 15px;
	background: #f8f9fa;
	border: 2px solid #e1e1e1;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	font-weight: 500;
}

.niupay-gateway-wrapper .amount-option:hover {
	border-color: #e31837;
	background: #fff5f5;
}

.niupay-gateway-wrapper .amount-option input[type="radio"] {
	margin-right: 8px;
}

.niupay-gateway-wrapper .amount-option input[type="radio"]:checked + span {
	color: #e31837;
	font-weight: 600;
}

/* Custom Amount */
.niupay-gateway-wrapper .custom-amount {
	padding: 15px;
	background: #f8f9fa;
	border-radius: 6px;
}

.niupay-gateway-wrapper .custom-amount .amount-option {
	background: transparent;
	border: none;
	padding: 0;
	margin-bottom: 5px;
}

.niupay-gateway-wrapper .custom-amount input[type="number"] {
	margin-top: 8px;
	width: 100%;
	display: none;
}

.niupay-gateway-wrapper .custom-amount.active input[type="number"] {
	display: block;
}

/* Donate Button */
.niupay-gateway-wrapper .donate-button {
	width: 100%;
	background: #e31837;
	color: white;
	padding: 18px;
	border: none;
	border-radius: 6px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease;
	margin-top: 10px;
	max-width: 250px;
}

.niupay-gateway-wrapper .donate-button:hover {
	background: #c41530;
}

.niupay-gateway-wrapper .donate-button:disabled {
	background: #cccccc;
	cursor: not-allowed;
}

/* Success/Error Messages on dedicated pages */
body.page-template-default.page-donation-gateway-success,
body.page-template-default.page-donation-gateway-failed {
	text-align: center;
}

/* Embedded Payment Overlay */
.kbliframeoverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 999999;
	display: none;
}

.kbliframeoverlay.show {
	display: flex;
	align-items: center;
	justify-content: center;
}

#kbliframeinnerdiv {
	background: white;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
}

#kblpaymentiframe {
	width: 100%;
	height: 600px;
	border: none;
}

/* Mobile Responsive */
@media (max-width: 600px) {
	.niupay-gateway-wrapper .niupay-gateway-form {
		margin: 10px;
		padding: 20px;
	}

	.niupay-gateway-wrapper .amount-grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.niupay-gateway-wrapper .amount-option {
		padding: 12px;
	}

	#kbliframeinnerdiv {
		width: 100%;
		height: 100%;
		max-width: none;
		border-radius: 0;
	}

	#kblpaymentiframe {
		height: 100vh;
	}
}
