/**
 * Shop Now Direct Razorpay Checkout — front-end styles.
 */

.shop-now.snrp-processing {
	position: relative;
	cursor: not-allowed;
	opacity: 0.75;
	pointer-events: none;
	padding-right: 2.5em !important;
}

.shop-now.snrp-processing::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 0.85em;
	width: 1em;
	height: 1em;
	margin-top: -0.5em;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: snrp-spin 0.7s linear infinite;
}

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

.snrp-notice {
	margin: 0 0 1.5em;
	padding: 1em 2em 1em 3.5em;
	position: relative;
	background: #fff;
	border-left: 4px solid #e2401c;
	list-style: none;
	word-wrap: break-word;
	font-size: 0.9em;
	line-height: 1.5;
	border-radius: 2px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.snrp-notice::before {
	content: '\2715';
	position: absolute;
	left: 1.2em;
	top: 50%;
	transform: translateY(-50%);
	color: #e2401c;
	font-weight: bold;
}

.snrp-notice.woocommerce-message {
	border-left-color: #7ad03a;
}

.snrp-notice.woocommerce-message::before {
	content: '\2713';
	color: #7ad03a;
}

/* Briefly draws attention to the site's own login button/popup trigger
   when Shop Now opens it for a logged-out customer. Intentionally avoids
   position/z-index changes so it never interferes with the site's own
   popup/overlay stacking. */
.snrp-highlight-login {
	box-shadow: 0 0 0 3px rgba(51, 153, 204, 0.55);
	border-radius: 4px;
	animation: snrp-login-pulse 1.3s ease-in-out 2;
}

@keyframes snrp-login-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(51, 153, 204, 0.65);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(51, 153, 204, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(51, 153, 204, 0);
	}
}

/* Billing/shipping address modal shown before the Razorpay popup opens. */
body.snrp-modal-open {
	overflow: hidden;
}

.snrp-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5em;
	box-sizing: border-box;
}

.snrp-modal {
	position: relative;
	background: #fff;
	border-radius: 6px;
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 2em;
	box-sizing: border-box;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.snrp-modal h2 {
	margin: 0 0 0.25em;
	font-size: 1.25em;
}

.snrp-modal-subtitle {
	margin: 0 0 1.25em;
	color: #666;
	font-size: 0.9em;
}

.snrp-modal-close {
	position: absolute;
	top: 0.75em;
	right: 0.75em;
	background: none;
	border: none;
	font-size: 1.5em;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0.2em 0.4em;
}

.snrp-modal-close:hover {
	color: #000;
}

.snrp-address-form .snrp-field-row {
	display: flex;
	gap: 1em;
}

.snrp-address-form .snrp-field-row .snrp-field {
	flex: 1;
	min-width: 0;
}

.snrp-field {
	margin-bottom: 1em;
}

.snrp-field label {
	display: block;
	margin-bottom: 0.35em;
	font-size: 0.9em;
	font-weight: 600;
}

.snrp-field input,
.snrp-field select {
	width: 100%;
	padding: 0.6em 0.7em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	box-sizing: border-box;
}

.snrp-field input:focus,
.snrp-field select:focus {
	outline: none;
	border-color: #3399cc;
	box-shadow: 0 0 0 2px rgba(51, 153, 204, 0.2);
}

.snrp-field-error {
	color: #e2401c;
	font-size: 0.9em;
	margin: -0.25em 0 1em;
}

.snrp-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.75em;
	margin-top: 1.25em;
}

.snrp-modal-actions button {
	padding: 0.65em 1.4em;
	border-radius: 4px;
	font-size: 0.95em;
	cursor: pointer;
	border: 1px solid transparent;
}

.snrp-modal-cancel {
	background: #f2f2f2;
	color: #333;
	border-color: #ddd;
}

.snrp-modal-cancel:hover {
	background: #e9e9e9;
}

.snrp-modal-submit {
	background: #3399cc;
	color: #fff;
}

.snrp-modal-submit:hover {
	background: #2b80ab;
}

@media (max-width: 480px) {
	.snrp-address-form .snrp-field-row {
		flex-direction: column;
		gap: 0;
	}
}
