/**
 * NeoGrow frontend styles.
 *
 * The --neo-* custom properties come from the merchant's Design settings and
 * are emitted at runtime; see NeoGrow\Frontend\Assets.
 */

.neoplugin-card {
	border-radius: var( --neo-border-radius );
	border: 1px solid var( --neo-border );
	color: var( --neo-text );
	padding: 20px;
	background: #fff;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.05 );
}

.neoplugin-card-primary {
	border-left: 4px solid var( --neo-primary );
}

#neoplugin_apply_points_btn {
	background-color: var( --neo-primary );
	border: none;
	border-radius: var( --neo-border-radius );
	cursor: pointer;
	white-space: nowrap;
}

#neoplugin_apply_points_btn:hover {
	opacity: 0.9;
}

.neoplugin-applied-notice {
	color: var( --neo-success );
	font-weight: bold;
	margin-bottom: 10px;
}

/* Lightbox */
#neoplugin-lightbox {
	display: none;
	position: fixed;
	z-index: 99999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba( 0, 0, 0, 0.9 );
	backdrop-filter: blur( 5px );
}

#neoplugin-lightbox.is-open {
	display: block;
}

.neoplugin-modal-content {
	margin: 5% auto;
	display: block;
	width: 80%;
	max-width: 800px;
	max-height: 85vh;
	object-fit: contain;
	animation-name: neoplugin-zoom;
	animation-duration: 0.3s;
	border-radius: 4px;
	box-shadow: 0 0 20px rgba( 0, 0, 0, 0.5 );
}

@keyframes neoplugin-zoom {
	from {
		transform: scale( 0 );
	}

	to {
		transform: scale( 1 );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.neoplugin-modal-content {
		animation: none;
	}
}

.neoplugin-close {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #898989;
	font-size: 40px;
	font-weight: bold;
	transition: 0.3s;
	width: 40px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
}

.neoplugin-close:hover,
.neoplugin-close:focus-visible {
	color: #fff;
}

#neoplugin-caption {
	color: #fff;
	text-align: center;
	padding: 10px 20px;
}

@media only screen and ( max-width: 700px ) {
	.neoplugin-modal-content {
		width: 95%;
		margin-top: 15%;
	}
}

/* Redemption form */
.neoplugin-redemption-wrapper {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 15px;
	max-width: 100%;
}

input.neoplugin-redeem-input {
	width: 100%;
	max-width: 300px;
	border-radius: var( --neo-border-radius );
}

.neoplugin-remove-link {
	color: #e65050;
	margin-left: 10px;
	text-decoration: underline;
	cursor: pointer;
}

/*
 * Cart & Checkout blocks: the points redemption panel.
 *
 * `.wp-block-neogrow-points-redemption` is the placeholder the blocks hydrate;
 * `.neoplugin-block-redemption` is the panel itself. Both are stable and
 * documented for merchants who want to restyle the panel — see docs/index.html.
 */
.wp-block-neogrow-points-redemption {
	margin: 0 0 16px;
}

.neoplugin-block-redemption {
	padding: 20px;
}

.neoplugin-block-redemption > * {
	margin-block: 0;
}

.neoplugin-block-redemption > * + * {
	margin-block-start: 12px;
}

.neoplugin-block-redemption__title {
	font-size: 1.05em;
	line-height: 1.3;
}

.neoplugin-block-redemption .neoplugin-redemption-wrapper {
	margin-bottom: 0;
}

.neoplugin-block-redemption__input {
	padding: 8px 10px;
}

/*
 * Both controls are selected as `.panel button.control` rather than by class
 * alone. Themes commonly style buttons as `.woocommerce button`, which outranks
 * a single class and would otherwise repaint these — Astra turns the plain
 * "Remove" control into a full primary button.
 */
.neoplugin-block-redemption button.neoplugin-block-redemption__apply {
	border-radius: var( --neo-border-radius );
	padding: 10px 18px;
	white-space: nowrap;
}

/* "Remove" is a button for keyboard and screen-reader users, but reads as a
   link, so the theme's button skin is stripped back off it. */
.neoplugin-block-redemption button.neoplugin-block-redemption__remove {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin-left: 8px;
	width: auto;
	min-height: 0;
	line-height: inherit;
	font: inherit;
	color: #e65050;
	text-decoration: underline;
	box-shadow: none;
}

.neoplugin-block-redemption button.neoplugin-block-redemption__remove:hover,
.neoplugin-block-redemption button.neoplugin-block-redemption__remove:focus {
	background: none;
	color: #c33;
}

.neoplugin-message {
	margin-top: 10px;
	font-size: 0.9em;
}

.neoplugin-message-error {
	color: #b32d2e;
	font-weight: 600;
}

/* Review upload */
.neoplugin-review-upload {
	margin: 15px 0;
}

.neoplugin-upload-label {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

#neoplugin_review_image {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

#neoplugin_review_image:focus-visible + #neoplugin-preview,
#neoplugin_review_image:focus-visible ~ .neoplugin-upload-label {
	outline: 2px solid var( --neo-primary );
	outline-offset: 2px;
}

#neoplugin-preview {
	margin-top: 10px;
	max-width: 100px;
}

.neoplugin-review-preview-img {
	max-width: 100%;
	border-radius: var( --neo-border-radius );
}

.neoplugin-review-image-wrapper {
	margin-top: 10px;
	width: 100%;
}

.neoplugin-review-image {
	max-width: 150px;
	border-radius: var( --neo-border-radius );
	border: 1px solid #ddd;
}

/* My Account */
.neoplugin-balance-amount {
	font-size: 2em;
	font-weight: bold;
	color: var( --neo-primary );
	margin: 10px 0;
}

.neoplugin-earn-rules {
	margin-top: 15px;
	border-top: 1px dashed #eee;
	padding-top: 10px;
	font-size: 0.9em;
	color: #646970;
}

.neoplugin-rules-list {
	margin: 5px 0 0 15px;
	list-style: disc;
}

.neoplugin-points-delta {
	font-weight: bold;
}

.neoplugin-pagination {
	margin-top: 20px;
}

.neoplugin-product-message {
	margin-bottom: 15px;
	color: var( --neo-success );
	font-weight: bold;
}
