/**
 * Loka Pay – Frontend Stylesheet
 * Styles for the payment form shortcode output.
 */

.loka-pay-form-wrapper {
	max-width: 480px;
	margin: 0 auto;
	font-family: inherit;
}

.loka-pay-form-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 20px;
	color: #1d2327;
}

.loka-pay-payment-form {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 28px 24px;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.loka-pay-field {
	margin-bottom: 18px;
}

.loka-pay-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 6px;
}

.loka-pay-field label .required {
	color: #d63638;
}

.loka-pay-currency {
	font-weight: 400;
	color: #646970;
}

.loka-pay-input,
.loka-pay-select {
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	color: #2c3338;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.loka-pay-input:focus,
.loka-pay-select:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
	outline: none;
}

.loka-pay-input[readonly] {
	background: #f6f7f7;
	cursor: not-allowed;
}

.loka-pay-select {
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23646970' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 32px;
}

.loka-pay-submit-row {
	margin-top: 24px;
}

.loka-pay-payment-form .loka-pay-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, transform 0.1s ease;
}

.loka-pay-payment-form .loka-pay-btn:active {
	transform: translateY(1px);
}

.loka-pay-payment-form .loka-pay-btn-primary {
	background: #2271b1;
	color: #fff;
	width: 100%;
}

.loka-pay-payment-form .loka-pay-btn-primary:hover {
	background: #135e96;
	color: #fff;
}

.loka-pay-payment-form .loka-pay-btn-primary:disabled {
	background: #8c8f94;
	cursor: not-allowed;
}

.loka-pay-payment-form .loka-pay-btn-secondary {
	background: #f0f0f1;
	color: #2c3338;
}

.loka-pay-payment-form .loka-pay-btn-secondary:hover {
	background: #dcdcde;
	color: #1d2327;
}

.loka-pay-btn-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: loka-spin 0.7s linear infinite;
}

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

.loka-pay-notices {
	margin-bottom: 16px;
}

.loka-pay-notice {
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 13px;
	margin-bottom: 8px;
}

.loka-pay-notice-error {
	background: #fce8e8;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

.loka-pay-notice-success {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #6ee7b7;
}

.loka-pay-secure-notice {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #646970;
	margin-top: 16px;
	text-align: center;
	justify-content: center;
}

/* ============================================================
   THANK-YOU PAGE
   ============================================================ */
.loka-pay-thankyou {
	max-width: 520px;
	margin: 40px auto;
	padding: 40px 30px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	text-align: center;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.loka-pay-thankyou-icon {
	width: 60px;
	height: 60px;
	line-height: 60px;
	font-size: 30px;
	border-radius: 50%;
	margin: 0 auto 20px;
	font-weight: 700;
}

.loka-pay-thankyou-success .loka-pay-thankyou-icon {
	background: #d1fae5;
	color: #065f46;
}

.loka-pay-thankyou-failed .loka-pay-icon-fail {
	background: #fee2e2;
	color: #991b1b;
}

.loka-pay-thankyou-heading {
	font-size: 22px;
	font-weight: 700;
	color: #1d2327;
	margin-bottom: 10px;
}

.loka-pay-thankyou-message {
	color: #646970;
	margin-bottom: 24px;
}

.loka-pay-thankyou-details {
	background: #f9f9f9;
	border-radius: 6px;
	padding: 18px 20px;
	text-align: left;
	margin-bottom: 24px;
}

.loka-pay-thankyou-details dl {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 16px;
	margin: 0;
}

.loka-pay-thankyou-details dt {
	font-size: 12px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
}

.loka-pay-thankyou-details dd {
	font-size: 13px;
	color: #1d2327;
	margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
	.loka-pay-payment-form {
		padding: 20px 16px;
	}

	.loka-pay-thankyou-details dl {
		grid-template-columns: 1fr;
	}
}

/* ── Forms built in Loka Pay → Forms ───────────────────────────────────── */
.loka-pay-custom-form .loka-pay-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}
.loka-pay-custom-form .loka-pay-fields > .loka-pay-field {
	flex: 1 1 100%;
	min-width: 0;
}
.loka-pay-custom-form .loka-pay-fields > .loka-pay-field--half {
	flex: 1 1 calc(50% - 8px);
}
@media (max-width: 520px) {
	.loka-pay-custom-form .loka-pay-fields > .loka-pay-field--half {
		flex-basis: 100%;
	}
}
.loka-pay-custom-form textarea.loka-pay-input {
	min-height: 96px;
	resize: vertical;
}
.loka-pay-fieldset {
	border: 0;
	margin: 0;
	padding: 0;
}
.loka-pay-fieldset legend {
	font-weight: 600;
	margin-bottom: 6px;
	padding: 0;
}
.loka-pay-field label.loka-pay-choice {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0;
	font-weight: 400;
	cursor: pointer;
}
.loka-pay-help {
	margin: 4px 0 0;
	font-size: 0.85em;
	opacity: 0.75;
}
.loka-pay-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 4px 0 16px;
	padding: 12px 14px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.04);
}
.loka-pay-total-value {
	font-size: 1.15em;
}
