/**
 * Penta Polls - right-to-left (Arabic, Hebrew, Urdu, Farsi).
 *
 * WordPress loads this instead of penta-polls.css on RTL sites, so it repeats
 * the shared rules and changes only what direction affects. Generated from the
 * main stylesheet: if you edit that, mirror the change here.
 */

.penta-poll {
	--penta-poll-accent: currentColor;
	--penta-poll-line: rgba(0, 0, 0, .12);
	--penta-poll-fill: rgba(0, 0, 0, .07);
	--penta-poll-chosen: rgba(0, 0, 0, .14);
	--penta-poll-radius: 0px;
	--penta-poll-gap: 10px;
	max-width: 34rem;
	text-align: right;
}

.penta-poll-question { margin: 0 0 .5em; }
.penta-poll-intro { margin: 0 0 1em; opacity: .8; }
.penta-poll-closed-note { font-size: .9em; opacity: .75; }

.penta-poll-options { display: grid; gap: var(--penta-poll-gap); margin: 0; }

.penta-poll-option {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--penta-poll-line);
	border-radius: var(--penta-poll-radius);
	cursor: pointer;
	overflow: hidden;
	text-align: right;
	transition: border-color .2s ease, background-color .2s ease;
}
.penta-poll-option:hover { border-color: var(--penta-poll-chosen); }
.penta-poll-option:focus-within { outline: 2px solid var(--penta-poll-accent); outline-offset: 2px; }
.penta-poll.is-closed .penta-poll-option,
.penta-poll-results-only .penta-poll-option { cursor: default; }

.penta-poll-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.penta-poll-mark {
	width: 16px; height: 16px; border-radius: 50%;
	border: 1px solid var(--penta-poll-chosen);
	flex: none; position: relative; z-index: 1;
	transition: background-color .2s ease, box-shadow .2s ease;
}
.penta-poll-option.is-chosen .penta-poll-mark {
	background: var(--penta-poll-accent);
	box-shadow: inset 0 0 0 3px #fff;
}

.penta-poll-label { position: relative; z-index: 1; }

.penta-poll-percent {
	position: relative; z-index: 1;
	font-variant-numeric: tabular-nums;
	direction: ltr;              /* 42% reads the same way in every language */
	unicode-bidi: isolate;
	opacity: 0;
	transition: opacity .3s ease;
}

.penta-poll-bar {
	position: absolute; inset: 0; z-index: 0;
	pointer-events: none;
	opacity: 0;
	transition: opacity .3s ease;
}
.penta-poll-fill {
	display: block; height: 100%; width: 0;
	margin-inline-start: auto;   /* the bar grows from the right */
	background: var(--penta-poll-fill);
	transition: width .6s cubic-bezier(.22, 1, .36, 1);
}
.penta-poll-option.is-chosen .penta-poll-fill { background: var(--penta-poll-chosen); }

.penta-poll.has-voted .penta-poll-bar,
.penta-poll.is-closed .penta-poll-bar,
.penta-poll-results-only .penta-poll-bar { opacity: 1; }
.penta-poll.has-voted .penta-poll-percent,
.penta-poll.is-closed .penta-poll-percent,
.penta-poll-results-only .penta-poll-percent { opacity: .85; }

.penta-poll-note { min-height: 1.4em; margin: .8em 0 0; font-size: .92em; line-height: 1.9; opacity: .85; }
.penta-poll-total { margin: .4em 0 0; font-size: .92em; opacity: .8; }
.penta-poll-count { font-weight: 700; direction: ltr; unicode-bidi: isolate; }

.penta-poll.is-saving { pointer-events: none; opacity: .75; }
.penta-poll-submit { justify-self: start; margin-top: 10px; }
.penta-poll-missing { padding: 12px; border: 1px dashed currentColor; opacity: .7; }

@media (prefers-reduced-motion: reduce) {
	.penta-poll-option,
	.penta-poll-bar,
	.penta-poll-fill,
	.penta-poll-percent,
	.penta-poll-mark { transition: none; }
}
