/**
 * WooCommerce External Links
 * Frontend Styles
 */

/* ---------------------------------------------------------
   Main wrapper
--------------------------------------------------------- */

.wel-external-links {
	width: 100%;
	margin: 18px 0;
	padding: 0;
	box-sizing: border-box;
}

/* ---------------------------------------------------------
   Title
--------------------------------------------------------- */

.wel-external-links .wel-title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
}

/* ---------------------------------------------------------
   Button container
--------------------------------------------------------- */

.wel-external-links .wel-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

/* ---------------------------------------------------------
   Base button
--------------------------------------------------------- */

.wel-external-links .wel-button {
	--wel-button-color: #2271b1;

	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	min-height: 44px;
	padding: 9px 15px;

	box-sizing: border-box;

	border: 1px solid var(--wel-button-color);
	border-radius: 6px;

	background: var(--wel-button-color);
	color: #ffffff;

	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;

	cursor: pointer;

	transition:
		background-color 0.18s ease,
		border-color 0.18s ease,
		color 0.18s ease,
		box-shadow 0.18s ease,
		transform 0.18s ease;
}

/* ---------------------------------------------------------
   Prevent theme styles from breaking the button
--------------------------------------------------------- */

.wel-external-links .wel-button:hover,
.wel-external-links .wel-button:focus,
.wel-external-links .wel-button:active {
	text-decoration: none;
}

.wel-external-links .wel-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ---------------------------------------------------------
   Hover
--------------------------------------------------------- */

.wel-external-links[data-style="solid"] .wel-button:hover {
	filter: brightness(0.92);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.10);
	transform: translateY(-1px);
}

/* ---------------------------------------------------------
   Logo
--------------------------------------------------------- */

.wel-external-links .wel-button-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	width: 24px;
	height: 24px;

	flex: 0 0 24px;

	overflow: hidden;
}

.wel-external-links .wel-button-logo img {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: contain;

	margin: 0;
	padding: 0;

	border: 0;
	background: transparent;
}

/* ---------------------------------------------------------
   Text
--------------------------------------------------------- */

.wel-external-links .wel-button-text {
	display: inline-block;

	white-space: nowrap;

	color: inherit;

	font: inherit;
	line-height: inherit;
}

/* ---------------------------------------------------------
   External icon
--------------------------------------------------------- */

.wel-external-links .wel-external-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	font-size: 15px;
	line-height: 1;

	opacity: 0.85;
}

/* ---------------------------------------------------------
   Solid style
--------------------------------------------------------- */

.wel-external-links[data-style="solid"] .wel-button {
	background: var(--wel-button-color);
	color: #ffffff;
}

.wel-external-links[data-style="solid"] .wel-button:hover {
	color: #ffffff;
}

/* ---------------------------------------------------------
   Outline style
--------------------------------------------------------- */

.wel-external-links[data-style="outline"] .wel-button {
	background: #ffffff;
	color: var(--wel-button-color);
}

.wel-external-links[data-style="outline"] .wel-button:hover {
	background: var(--wel-button-color);
	color: #ffffff;
}

/* ---------------------------------------------------------
   Minimal style
--------------------------------------------------------- */

.wel-external-links[data-style="minimal"] .wel-button {
	background: transparent;
	color: var(--wel-button-color);

	border-color: transparent;

	padding-left: 6px;
	padding-right: 6px;
}

.wel-external-links[data-style="minimal"] .wel-button:hover {
	background: rgba(0, 0, 0, 0.04);
	color: var(--wel-button-color);
	transform: none;
	box-shadow: none;
}

/* ---------------------------------------------------------
   Marketplace-specific logo sizing
--------------------------------------------------------- */

.wel-external-links .wel-button-tokopedia .wel-button-logo,
.wel-external-links .wel-button-shopee .wel-button-logo,
.wel-external-links .wel-button-lazada .wel-button-logo,
.wel-external-links .wel-button-blibli .wel-button-logo,
.wel-external-links .wel-button-tiktok_shop .wel-button-logo {
	width: 28px;
	height: 28px;

	flex-basis: 28px;
}

/* ---------------------------------------------------------
   WhatsApp
--------------------------------------------------------- */

.wel-external-links .wel-button-whatsapp {
	font-weight: 600;
}

/* ---------------------------------------------------------
   Custom link
--------------------------------------------------------- */

.wel-external-links .wel-button-custom {
	font-weight: 600;
}

/* ---------------------------------------------------------
   Accessibility
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.wel-external-links .wel-button {
		transition: none;
	}

	.wel-external-links[data-style="solid"] .wel-button:hover {
		transform: none;
	}

}

/* ---------------------------------------------------------
   Tablet
--------------------------------------------------------- */

@media screen and (max-width: 768px) {

	.wel-external-links {
		margin-top: 16px;
		margin-bottom: 16px;
	}

	.wel-external-links .wel-buttons {
		gap: 8px;
	}

	.wel-external-links .wel-button {
		min-height: 42px;
		padding: 8px 13px;
		font-size: 13px;
	}

}

/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */

@media screen and (max-width: 480px) {

	.wel-external-links .wel-buttons {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
	}

	.wel-external-links .wel-button {
		width: 100%;
		min-width: 0;
	}

	.wel-external-links .wel-button-text {
		overflow: hidden;
		text-overflow: ellipsis;
	}

}

/* ---------------------------------------------------------
   Very small screens
--------------------------------------------------------- */

@media screen and (max-width: 340px) {

	.wel-external-links .wel-buttons {
		grid-template-columns: 1fr;
	}

	.wel-external-links .wel-button {
		width: 100%;
	}

}