.onyx-poll *, .onyx-poll *::before, .onyx-poll *::after {
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

.onyx-poll {
	--pollWidgetWidth: 100%;
	--borderColor: rgba(35,185,206, .3);
	--boxShadow: 0 4px 12px 6px rgba(31,70,88,0.1);
	--modalBorderRadius: 0;
	--questionColor: #333;
	--choiceColor: #333;
	--buttonColor: #333;
	--choiceHoverBG: #f5f5f5;
	--choiceBarColor: #e0e0e0;
	--choiceBorderRadius: 100px;
	--closeBorderRadius: 100px;
	--loaderBorderColor: rgb(209, 226, 240);
	--loaderBG: #a3caec;
	--choicePercentage: 100%;
	--choiceResult: "";

	position: relative;
	pointer-events: none;
	background: #FFF;
	padding: 20px;
	opacity: 0;

	border: 1px solid #eaeaea;
	border-radius: 0;
	box-shadow: 0 0 12px 6px rgba(0, 0, 0, 0.1);
	border: 1px solid var(--borderColor);
	border-radius: var(--modalBorderRadius);
	box-shadow: var(--boxShadow);

	text-align: left;
}
.onyx-poll.show {
	opacity: 1;
}
.onyx-poll.active {
	pointer-events: all;
}

.onyx-poll-wrapper {
	transition: all 300ms ease;
}

.onyx-poll-modal {
	width: calc(100% - 30px);
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 80;
}

@media only screen and (min-width: 768px) {
	.onyx-poll-modal {
		width: 100%;
		max-width: 500px;
	}
}

/* CLOSE MODAL BUTTON */
.onyx-poll-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 25px;
	height: 25px;

	border-radius: 100px;
	border-radius: var(--closeBorderRadius);

	background: #f0f0f0;

	border: 1px solid #eaeaea;
	border: 1px solid var(--borderColor);

	cursor: pointer;
	transition: all 200ms ease;
}
	.onyx-poll-close:after {
		content: "";
		display: block;
		width: 100%;
		height: 100%;
		background-image: url('data:image/svg+xml;utf8,<svg height="487.595" viewBox="0 0 365.696 365.696" width="487.595" xmlns="http://www.w3.org/2000/svg"><path d="M243.188 182.86L356.32 69.726c12.5-12.5 12.5-32.766 0-45.247L341.238 9.398c-12.504-12.503-32.77-12.503-45.25 0L182.86 122.528 69.727 9.374c-12.5-12.5-32.766-12.5-45.247 0L9.375 24.457c-12.5 12.504-12.5 32.77 0 45.25l113.152 113.152L9.398 295.99c-12.503 12.503-12.503 32.769 0 45.25l15.082 15.08c12.5 12.5 32.766 12.5 45.247 0l113.132-113.132L295.99 356.32c12.503 12.5 32.769 12.5 45.25 0l15.081-15.082c12.5-12.504 12.5-32.77 0-45.25zm0 0"/></svg>');
		background-position: center center;
		background-size: 10px;
		background-repeat: no-repeat;
		opacity: .5;
		transition: all 200ms ease;
	}

	.onyx-poll-close:hover {
		border-color: #FF554E;
		background: #FF554E;
	}

	.onyx-poll-close:hover:after {
		background-image: url('data:image/svg+xml;utf8,<svg height="487.595" viewBox="0 0 365.696 365.696" width="487.595" xmlns="http://www.w3.org/2000/svg"><path fill="white" d="M243.188 182.86L356.32 69.726c12.5-12.5 12.5-32.766 0-45.247L341.238 9.398c-12.504-12.503-32.77-12.503-45.25 0L182.86 122.528 69.727 9.374c-12.5-12.5-32.766-12.5-45.247 0L9.375 24.457c-12.5 12.504-12.5 32.77 0 45.25l113.152 113.152L9.398 295.99c-12.503 12.503-12.503 32.769 0 45.25l15.082 15.08c12.5 12.5 32.766 12.5 45.247 0l113.132-113.132L295.99 356.32c12.503 12.5 32.769 12.5 45.25 0l15.081-15.082c12.5-12.504 12.5-32.77 0-45.25zm0 0"/></svg>');
		opacity: 1;
	}

/* QUESTION */
.onyx-poll-question {
	color: #333;
	color: var(--questionColor);

	width: 100%;
	font-weight: bold;
	font-size: 16px !important;
	margin: 0 0 20px 0 !important;
	line-height: 1.3 !important;
}
.onyx-poll-modal p.onyx-poll-question {
	width: calc(100% - 30px);
}

/* CHOICES */
.onyx-poll-choices, {
	margin: 0 0 20px 0 !important;
	padding: 0 !important;
}
.onyx-poll-choices li {
	cursor: pointer;
	position: relative;
	width: 100%;
	font-size: 16px;

	border: 1px #eaeaea solid;
	border-radius: 0;
	border: 1px var(--borderColor) solid;

	color: #333;
	color: var(--choiceColor);
	
	padding: 10px 15px 10px 15px;
	margin: 0 0 10px 0 !important;
	overflow: hidden;
	display: flex;
	align-items: center;
}
.onyx-poll-choices li .image {
	border-radius: 0;
	overflow: hidden;
	display: inline-block;
	flex: 0 0 100px;
	height: 60px;
	margin: 0 10px 0 0;
	z-index: 1;
}

.image-inner-wrap {
	position: relative;
}

.image-inner-wrap {
	position: relative;
}

.image-inner-wrap .image-text {
	position: absolute;
	z-index: 10;
	height: 100%;
	width: 100%; 
	text-align: center;
	line-height: 18px;
	color: white; 
	top: 0;
	text-transform: uppercase;
	background: rgba(35,185,206, .9);
	font-size: 13px;
	font-weight: 600;
	padding-top: 10px; 
	opacity: 0;
	transition: all 300ms ease;
}
.inner-wrap .onyx-poll-close {
	position: absolute;
	top: 15px;
	right: 15px;
}
.onyx-poll-choice:hover .image-text {
	opacity: 1;
}

.onyx-poll-choices li span.answer {
	position: relative;
	pointer-events: none;  /* need to fix this: issue #8 */
	z-index: 1;
	width: 100%;
}
.onyx-poll-choices li:last-child {
	margin-bottom: 0;
}

.onyx-poll-choices li:hover,
.onyx-poll-choices li.choosed {
	font-weight:normal;
	color: #23b9ce;
}
.onyx-poll-choices li:hover:before {
	transform: translate3d(0, 0, 0);
}

/* FOOTER */
.onyx-poll-footer {
	display: flex;
	justify-content: space-between;
}

/* view results/vote buttons */
.onyx-poll-ft-btn {
	font-size: 13px;
	margin-left: auto;
	text-decoration: none;
	box-shadow: none !important;

	color: #333;
	color: var(--buttonColor);
}
.onyx-poll-ft-btn:hover {
	color: #333;
	color: var(--buttonColor);

	text-shadow: 0px 0px 1px currentColor;
}

.onyx-poll-vote { display: none; }
.onyx-poll.view .onyx-poll-vote { display: block; }
.onyx-poll.view .onyx-poll-view { display: none; }
.onyx-poll.voted .onyx-poll-vote { display: none !important; }

/* message / total */
.onyx-poll-message,
.onyx-poll-total { font-size: 13px; display: none; margin: 0; }
.onyx-poll.voted .onyx-poll-message { display: block; }
.onyx-poll.view .onyx-poll-total { display: block; }
.onyx-poll-message.success { color: #155724; }
.onyx-poll-message.error { color: #FF554E; }
.onyx-poll-message.warn,
.onyx-poll-message.not_allowed,
.onyx-poll-invalid { color: #856404; }


/* LOADER */
.onyx-poll.loading .onyx-poll-wrapper {
	opacity: .3;
}
.onyx-poll.loading .onyx-poll-loader {
	opacity: 1;
}
.onyx-poll-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate3d(-50%, -50%, 0) scale(.5);
	opacity: 0;
	transition: all 300ms ease;
	pointer-events: none;
}
.onyx-poll-loader .spinner,
.onyx-poll-loader .spinner:after {
	border-radius: 50%;
	width: 10em;
	height: 10em;
}
.onyx-poll-loader  .spinner {
	position: relative;
	display: block;
	font-size: 10px;
	text-indent: -9999em;
	border-top: 1.1em solid var(--loaderBorderColor);
	border-right: 1.1em solid var(--loaderBorderColor);
	border-bottom: 1.1em solid var(--loaderBorderColor);
	border-left: 1.1em solid var(--loaderBG);
	transform: translateZ(0);
	animation: load8 1.1s infinite linear;
}
@-webkit-keyframes load8 {
	0% {
		-webkit-transform: rotate(0deg);
		transform: rotate(0deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}
@keyframes load8 {
	0% {
		-webkit-transform: rotate(0deg);
		transform: rotate(0deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

/* VIEW RESULTS */
.onyx-poll.view .onyx-poll-choices li {
	cursor: auto;
}
.onyx-poll.view .onyx-poll-choices li:before,
.onyx-poll.view .onyx-poll-choices li:after {
	display: block;
	opacity: 1;
	transition: all 600ms ease;
	transform: none;
	font-size: 13px;
}

.onyx-poll-choices li:after {
	content: var(--choiceResult);
	display: none;
	text-align: right;
	width: 100%;
	max-width: 140px;
	position: relative;
	margin-left: auto;
}
.onyx-poll-choices li:before {
	opacity: .6;
	content: "";
	display: block;

	width: 100%;
	width: var(--choicePercentage);

	height: 100%;
	position: absolute;
	top: 0;
	left: 0;

	background-color: #f5f5f5;
	background-color: var(--choiceHoverBG);

	/* z-index: -1; */
	transition: all 100ms ease;
	transform: translate3d(-100%, 0, 0);
}

/* WIDGET */
.onyx-poll-widget {
	box-shadow: none;
	width: 100%;
	max-width: 100%;
	margin: 1em 0 1em 0;
}

/* SIDEBAR WIDGET */
.widget_onyx_poll .onyx-poll-widget {
	margin: auto;
	padding: 0;
	border: 0;
	max-width: 100%;
}

@media screen and (min-width: 767px) {

	.onyx-poll-widget {
		box-shadow: none;
		width: 100%;
		max-width: var(--pollWidgetWidth);
	}

	.onyx-poll-widget.left {
		float: left;
		margin: 0 1em 1em 0;
	}

	.onyx-poll-widget.right {
		float: right;
		margin: 0 0 1em 1em;
	}

	.onyx-poll-widget.full {
		max-width: 100%;
		margin: 1.5em auto 1.5em auto;
	}

	/*
	/* GUTENBERG BLOCK
	*/
	.block-editor-block-list__block[data-type='acf/acf-onyx-poll']:not(.is-selected) > .is-block-content {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	.onyx-poll-block {
		max-width: 100%;
		margin: 1.5em auto 1.5em auto;
	}
	.onyx-poll-block .onyx-poll-widget {
		width: 100%;
		max-width: 100%;
		margin: 0;
	}
	.onyx-poll-alignleft {
		float: left;
		margin: 0 1em 1em 0;
	}
	.onyx-poll-alignright {
		float: right;
		margin: 0 0 1em 1em;
	}
	.onyx-poll-alignleft,
	.onyx-poll-alignright {
		width: 300px;
	}

}

/*
/* BAR STANDARD STYLE
*/
.onyx-poll.standard .onyx-poll-choices li { border-radius: 4px; }
.onyx-poll.standard.view .onyx-poll-choices li:before { display: none; }

.onyx-poll.standard.view .onyx-poll-choices li:after {
	position: absolute;
	width: 100%;
	max-width: 100%;
	right: 20px;
	bottom: 10px;
	z-index: 2;
}

.onyx-poll.standard.view .onyx-poll-choices .answer:after {
	opacity: .6;
	content: "";
	display: block;
	margin: 10px 0 0 0;

	width: 100%;
	width: var(--choicePercentage);

	height: 10px;
	position: relative;

	background: var(--choiceBarColor);
	border: 1px #ccc solid;
}

/* Punktbar */ 

.tdb-poll-wrapper { 
	position: relative;
}

.onyx-poll-innerscreen {
	position: absolute;
	z-index: 10; 
	padding: 50px;
	text-align: center; 
	height: 100%; 
	width: 100%; 
	display: block;
}

.onyx-poll-innerscreen .inner-wrap {
	position: relative;
	top: 50%;
	transform: translateY(-50%);
	max-width: 480px;
	background: white;
	padding: 32px;
	margin: auto;
	box-shadow: 0px 15px 30px rgba(2, 33, 39, 0.6);
}

.onyx-poll-innerscreen.hidden {
	display: none !important; 
}

.onyx-poll-choices {
	padding: 0 !important;  
}

#vote_submit {
	padding: 10px 20px;
	border: none;
	background: #23b9ce;
	font-family: Source Sans Pro;
	font-weight: 600;
	font-style: normal;
	letter-spacing: 0px;
	text-transform: uppercase;
	color: white; 
	margin-top: 24px; 
	transition: all 300ms ease;
}

#vote_submit:hover {
	cursor: pointer;
	background: #fc296e;
}
#vote_submit:active {
	background: #fc296e;
}

#vote_mail:active, #vote_mail:focus {
	border-color: #23b9ce; 
}

@media screen and (max-width: 480px) {
	.onyx-poll-innerscreen {
		padding: 0;
	}
}
