/* ==========================================================================
   e-SwapMeet Core — Public Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Social Icons
   — .esm-social-icons--footer  : footer strip between main grid and copyright
   — .esm-social-icons--inline  : shortcode output on page content (light bg)
   -------------------------------------------------------------------------- */

.esm-social-icons {
	text-align: center;

	& .esm-social-icons__list {
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 0.25em;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	& .esm-social-icons__item {
		margin: 0;
		padding: 0;
	}

	& .esm-social-icons__link {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 2.75em;
		height: 2.75em;
		text-decoration: none;
		transition: color 0.2s ease;

		& svg {
			width: 1.375em;
			height: 1.375em;
			fill: currentColor;
			display: block;
			flex-shrink: 0;
		}
	}
}

/* Footer variant — dark background, white icons */
.esm-social-icons--footer[class] {
	padding: 0.75em 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);

	& .col-full {
		display: flex;
		justify-content: center;
	}

	& .esm-social-icons__link[class] {
		color: #fff;

		&:hover,
		&:focus {
			color: #3C3B6E;
		}
	}
}

/* Inline / shortcode variant — light background, brand-colored icons */
.esm-social-icons--inline[class] {
	padding: 0.75em 0;

	& .esm-social-icons__link[class] {
		color: #3C3B6E;

		&:hover,
		&:focus {
			color: #6d6bc8;
		}
	}
}

/* --------------------------------------------------------------------------
   Product Enquiry — success banner
   -------------------------------------------------------------------------- */

.esm-enquiry-success {
	display: block;
	background: linear-gradient(135deg, #3C3B6E, #6d6bc8);
	color: #fff;
	font-size: 1.125em;
	text-align: center;
	padding: 0.875em 1.25em;
	border-radius: 4px;
	margin-bottom: 1em;

	& strong {
		display: block;
		font-size: 1.2em;
		margin-bottom: 0.2em;
	}
}

/* --------------------------------------------------------------------------
   Vendor Registration Shortcode — [esm_vendor_register]
   -------------------------------------------------------------------------- */

.esm-vr-hero {
	margin-bottom: 2em;

	&__headline {
		font-size: 2.5em;
		line-height: 1.15;
		color: #3C3B6E;
		margin: 0 0 0.4em;
	}

	&__subheadline {
		font-size: 1.25em;
		line-height: 1.6;
		color: #444;
		max-width: 46em;
		margin: 0;
	}
}

.esm-vr-pills {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25em;
	margin-bottom: 2.5em;
}

.esm-vr-pill {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.4em;
	padding: 1.5em;
	border-radius: 0.75em;
	background: linear-gradient(135deg, #3C3B6E, #6d6bc8);
	color: #fff;

	&__icon {
		display: inline-flex;
		margin-bottom: 0.25em;

		& .esm-vr-svg {
			width: 2em;
			height: 2em;
		}
	}

	&__label {
		font-size: 1.375em;
		font-weight: 700;
		line-height: 1.2;
	}

	&__payoff {
		font-size: 1em;
		line-height: 1.5;
		color: rgba(255, 255, 255, 0.9);
	}
}

.esm-vr-form {
	max-width: 480px;

	& .woocommerce-form-register {
		padding: 0;
		border: none;
		box-shadow: none;
	}

	& .show_if_seller {
		display: block !important;
	}

	& .vendor-customer-registration {
		display: none !important;
	}

	& .woocommerce-form-register__submit {
		width: 100%;
		font-size: 1.1em;
		padding: 0.8em 1.5em;
		background: linear-gradient(135deg, #3C3B6E, #6d6bc8);
		color: #fff;
		border: none;
		cursor: pointer;

		&:hover,
		&:focus {
			background: linear-gradient(135deg, #6d6bc8, #3C3B6E);
		}

		&:disabled,
		&[aria-disabled="true"] {
			opacity: 0.55;
			cursor: not-allowed;
			background: linear-gradient(135deg, #3C3B6E, #6d6bc8);
		}
	}

	/* reCAPTCHA "Loading verification…" placeholder — shown until the widget
	   iframe renders so the user sees the box is on its way (real mobile render
	   can take several seconds on cellular). */
	& .esm-vr-recaptcha-loading {
		display: flex;
		align-items: center;
		min-height: 78px;
		padding: 0.6em 1em;
		max-width: 304px;
		border: 1px solid #d3d3d3;
		border-radius: 3px;
		background: #f9f9f9;
		color: #555;
		font-size: 0.9375em;

		&::before {
			content: "";
			flex: 0 0 auto;
			display: inline-block;
			width: 1.1em;
			height: 1.1em;
			margin-right: 0.6em;
			border: 2px solid #6d6bc8;
			border-top-color: transparent;
			border-radius: 50%;
			animation: esm-vr-spin 0.8s linear infinite;
		}

		/* Stalled state (fail-safe fired, API never loaded): drop the spinner,
		   show the explanatory copy on its own. */
		&.esm-vr-recaptcha-loading--stalled {
			min-height: 0;
			border-left: 3px solid #c0392b;
			background: #fdecea;
			color: #8a1f17;
			font-size: 0.875em;

			&::before {
				display: none;
			}
		}
	}

	/* Inline "complete the verification" message shown when a user tries to
	   submit before checking the box. Replaces the old full-page reload error. */
	& .esm-vr-recaptcha-msg {
		margin: 0.5em 0 0;
		padding: 0.6em 0.8em;
		max-width: 304px;
		border-left: 3px solid #c0392b;
		background: #fdecea;
		color: #8a1f17;
		font-size: 0.875em;
	}
}

@keyframes esm-vr-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.esm-vr-form .esm-vr-recaptcha-loading::before {
		animation: none;
	}
}

.esm-vr-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.esm-vr-trust {
	max-width: 480px;
	margin: 1em 0 0;
	font-size: 0.875em;
	color: #777;
	text-align: center;
}

.esm-vr-notice {
	font-size: 1.1em;
	padding: 1em;
}

@media (max-width: 600px) {
	.esm-vr-pills {
		grid-template-columns: 1fr;
	}

	.esm-vr-hero__headline {
		font-size: 1.875em;
	}
}

/* --------------------------------------------------------------------------
   Dokan Store Support — "Get Support" button on single product page
   Relocated below the add-to-cart form (see Dokan_Customizer). Styled as a
   secondary/outline action so it does not compete with the primary
   Add to Cart CTA. Stacked attribute selectors boost specificity over
   Dokan's own .dokan-store-support-btn-product rule without !important.
   -------------------------------------------------------------------------- */

.single-product .dokan-store-support-btn-product[class][class] {
	display: inline-block;
	width: auto;
	margin: 1.5em 0 0;
	padding: 0.6em 1.5em;
	background: transparent;
	color: #3C3B6E;
	border: 2px solid #3C3B6E;
	border-radius: 4px;
	font-size: 0.9375em;
	line-height: 1.4;
	transition: background 0.2s ease, color 0.2s ease;

	&:hover,
	&:focus {
		background: #3C3B6E;
		color: #fff;
	}
}
