/* ==========================================================================
   WhatsApp Product Button — Premium styles
   ========================================================================== */

.wcwpb-wrapper {
	margin: 18px 0;
	line-height: normal;
}

/* -------------------- Botón -------------------- */

.wcwpb-wrapper button.wcwpb-btn,
button.wcwpb-btn {
	/* Variables inyectadas desde PHP (colores/medidas personalizables) */
	--wcwpb-bg: #25D366;
	--wcwpb-bg-rgb: 37, 211, 102;
	--wcwpb-color: #ffffff;
	--wcwpb-radius: 50px;
	--wcwpb-fs: 16px;
	--wcwpb-py: 12px;
	--wcwpb-px: 24px;

	all: revert;
	box-sizing: border-box !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;

	position: relative !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	vertical-align: middle !important;

	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;

	background: linear-gradient(135deg, var(--wcwpb-bg) 0%, rgba(var(--wcwpb-bg-rgb), 0.85) 100%) !important;
	background-color: var(--wcwpb-bg) !important;
	color: var(--wcwpb-color) !important;
	border: none !important;
	border-radius: var(--wcwpb-radius) !important;
	padding: var(--wcwpb-py) var(--wcwpb-px) !important;

	font-family: inherit !important;
	font-size: var(--wcwpb-fs) !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	letter-spacing: 0.2px !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	white-space: nowrap !important;

	cursor: pointer !important;
	box-shadow:
		0 4px 14px rgba(var(--wcwpb-bg-rgb), 0.38),
		0 1px 2px rgba(0, 0, 0, 0.06) !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
	-webkit-tap-highlight-color: transparent;
}

.wcwpb-wrapper button.wcwpb-btn:hover,
button.wcwpb-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.04);
	box-shadow:
		0 8px 22px rgba(var(--wcwpb-bg-rgb), 0.45),
		0 2px 4px rgba(0, 0, 0, 0.08) !important;
	color: var(--wcwpb-color) !important;
}

.wcwpb-wrapper button.wcwpb-btn:active,
button.wcwpb-btn:active {
	transform: translateY(0) scale(0.97);
	box-shadow:
		0 3px 10px rgba(var(--wcwpb-bg-rgb), 0.35) !important;
}

.wcwpb-wrapper button.wcwpb-btn:focus,
.wcwpb-wrapper button.wcwpb-btn:focus-visible {
	outline: 2px solid rgba(var(--wcwpb-bg-rgb), 0.6);
	outline-offset: 3px;
}

/* Contenedor del ícono: fuerza altura de línea 0 para que no desalinee el texto */
.wcwpb-icon-wrap {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 0 !important;
	flex-shrink: 0 !important;
}

svg.wcwpb-icon {
	display: block !important;
	width: 1.25em !important;
	height: 1.25em !important;
	flex-shrink: 0 !important;
}

.wcwpb-btn-text {
	display: inline-block !important;
	line-height: 1 !important;
	color: inherit !important;
	transform: translateY(0.5px); /* micro-ajuste óptico para centrar con el ícono */
}

/* -------------------- Overlay -------------------- */

.wcwpb-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(11, 20, 26, 0.6);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: wcwpb-overlay-in 0.2s ease;
}

.wcwpb-modal-overlay.wcwpb-open {
	display: flex;
}

@keyframes wcwpb-overlay-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* -------------------- Tarjeta del modal -------------------- */

.wcwpb-modal {
	position: relative;
	background: #ffffff;
	border-radius: 22px;
	max-width: 380px;
	width: 100%;
	padding: 34px 26px 26px;
	box-shadow:
		0 24px 70px rgba(0, 0, 0, 0.28),
		0 4px 14px rgba(0, 0, 0, 0.08),
		0 0 0 1px rgba(0, 0, 0, 0.04);
	animation: wcwpb-modal-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes wcwpb-modal-in {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

button.wcwpb-modal-close {
	all: revert;
	box-sizing: border-box !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	position: absolute !important;
	top: 16px !important;
	right: 16px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 32px !important;
	height: 32px !important;
	min-height: 0 !important;
	margin: 0 !important;
	background: #f2f4f3 !important;
	border: none !important;
	border-radius: 50% !important;
	color: #667085 !important;
	cursor: pointer !important;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
}

button.wcwpb-modal-close:hover {
	background: #e6e9e8 !important;
	color: #1a1a1a !important;
	transform: rotate(90deg);
}

/* -------------------- Encabezado -------------------- */

.wcwpb-modal-header {
	text-align: center;
	margin-bottom: 26px;
}

.wcwpb-modal-header-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
	box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
	margin-bottom: 14px;
}

.wcwpb-modal-title {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 700;
	color: #101828;
	letter-spacing: -0.2px;
}

.wcwpb-modal-subtitle {
	margin: 0;
	font-size: 13.5px;
	color: #667085;
	line-height: 1.4;
}

/* -------------------- Opciones -------------------- */

.wcwpb-modal-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

button.wcwpb-option {
	all: revert;
	box-sizing: border-box !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	display: flex !important;
	align-items: center !important;
	gap: 14px !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	background: #fafbfa !important;
	border: 1px solid #edf0ef !important;
	border-radius: 16px !important;
	padding: 13px 14px !important;
	cursor: pointer !important;
	text-align: left !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	text-decoration: none !important;
	color: inherit !important;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease !important;
}

button.wcwpb-option:hover {
	background: #eefaf2 !important;
	border-color: rgba(37, 211, 102, 0.4) !important;
	transform: translateX(2px);
	box-shadow: 0 4px 14px rgba(37, 211, 102, 0.12) !important;
}

button.wcwpb-option:active {
	transform: translateX(2px) scale(0.98);
}

.wcwpb-option-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
	line-height: 0;
	box-shadow: 0 3px 8px rgba(37, 211, 102, 0.35);
}

.wcwpb-option-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.wcwpb-option-label {
	font-size: 15px;
	font-weight: 600;
	color: #101828;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wcwpb-option-sub {
	font-size: 12.5px;
	color: #98a2b3;
	line-height: 1.2;
}

.wcwpb-option-chevron {
	flex-shrink: 0;
	color: #b6bcc4;
	transition: transform 0.18s ease, color 0.18s ease;
}

.wcwpb-option:hover .wcwpb-option-chevron {
	transform: translateX(3px);
	color: #25D366;
}

/* -------------------- Responsive -------------------- */

@media (max-width: 420px) {
	.wcwpb-modal {
		padding: 28px 20px 22px;
		border-radius: 18px;
	}
	button.wcwpb-btn {
		width: 100% !important;
	}
}
