/**
 * SosWoo Buy Now Button Pro — frontend styles.
 *
 * @package SosWoo\BNBPro
 */

/* -------------------------------------------------------------------------
 * Button
 * ---------------------------------------------------------------------- */

.soswoo-bnbpro-button {
	display: inline-block;
	box-sizing: border-box;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	line-height: 1.2;
	font-weight: 600;
	border-style: solid;
	border-width: 1px;
	border-radius: 4px;
	padding: 0.75em 1.5em;
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	vertical-align: middle;
}

.soswoo-bnbpro-button.soswoo-bnbpro-button--theme-style {
	padding: inherit;
	line-height: inherit;
	font-weight: inherit;
	font-size: inherit;
	border-radius: inherit;
}

.soswoo-bnbpro-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.soswoo-bnbpro-button.soswoo-bnbpro-button--loading {
	opacity: 0.7;
	pointer-events: none;
}

/* -------------------------------------------------------------------------
 * Wrappers
 * ---------------------------------------------------------------------- */

.soswoo-bnbpro-archive-wrap {
	display: block;
	width: 100%;
	margin: 0.75em 0;
	clear: both;
}

.soswoo-bnbpro-single-wrap {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin: 0 0 0 8px;
	line-height: 1;
}

.soswoo-bnbpro-single-wrap--before {
	display: block;
	margin: 0 0 10px 0;
}

.soswoo-bnbpro-shortcode-wrap {
	display: inline-block;
	vertical-align: middle;
	margin: 0.5em 0;
}

/* -------------------------------------------------------------------------
 * Variable product button states
 * ---------------------------------------------------------------------- */

.soswoo-bnbpro-button.soswoo-bnbpro-button--disabled,
.soswoo-bnbpro-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
	filter: grayscale(0.4);
}

.soswoo-bnbpro-button.soswoo-bnbpro-button--enabled {
	opacity: 1;
	cursor: pointer;
	pointer-events: auto;
	filter: none;
}

/* -------------------------------------------------------------------------
 * Toast
 * ---------------------------------------------------------------------- */

.soswoo-bnbpro-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	background: #32373c;
	color: #fff;
	padding: 10px 16px;
	border-radius: 4px;
	font-size: 14px;
	z-index: 999999;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	max-width: 90vw;
}

.soswoo-bnbpro-toast.is-visible {
	opacity: 1;
}

.soswoo-bnbpro-toast.is-error {
	background: #b32d2e;
}

/* -------------------------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------------------- */

@media (max-width: 480px) {
	ul.products .soswoo-bnbpro-archive-wrap .soswoo-bnbpro-button {
		width: 100%;
		display: block;
	}
}