/**
 * Penta Polls - "cue" skin, right-to-left.
 *
 * WordPress loads this INSTEAD of penta-polls-cue.css on Arabic, Hebrew, Urdu
 * and Farsi sites, so it repeats the shared rules and mirrors what direction
 * affects. Edit both files together.
 *
 *
 * Loaded only when a poll asks for it:  [penta_poll id="12" skin="cue"]
 *
 * This is the design from the change cue banner: a white card with a thin mint
 * border, the answers as outlined rows that fill with colour once a vote is in,
 * a hand-written note underneath, and the running total in the display face.
 *
 * Every colour and face is a variable. Point them at your own theme's tokens
 * and the same skin carries a different brand:
 *
 *   .penta-poll-cue { --cue-teal: #0d4940; --cue-display: "Playfair Display", serif; }
 *
 * Fonts fall back to the theme's own, so nothing is loaded by the plugin.
 */

/* ---------- Arabic faces (bundled, SIL Open Font Licence) ---------------- */
@font-face{ font-family:'Penta Display'; src:url('../fonts/Amiri-400-arabic.woff2') format('woff2');
  font-weight:400; font-style:normal; font-display:swap; }
@font-face{ font-family:'Penta Body'; src:url('../fonts/Cairo-400-normal.woff2') format('woff2');
  font-weight:400; font-style:normal; font-display:swap; }
@font-face{ font-family:'Penta Hand'; src:url('../fonts/Lemonada-400-arabic.woff2') format('woff2');
  font-weight:400; font-style:normal; font-display:swap; }


.penta-poll-cue {
	--cue-teal: #0d4940;
	--cue-berry: #833454;
	--cue-mint: #cad3c1;
	--cue-cloud: #f2f2e9;
	--cue-orange: #d73c29;
	--cue-blush: #ecc6c7;
	--cue-muted: #527c73;

	--cue-display: 'Penta Display', 'Playfair Display', Georgia, serif;                 /* the theme's heading face  */
	--cue-body: 'Penta Body', 'DM Sans', system-ui, sans-serif;                    /* the theme's body face     */
	--cue-hand: 'Penta Hand', 'Caveat', cursive;                    /* hand-written note face    */

	--cue-card-bg: #fff;
	--cue-radius: 0px;

	max-width: 520px;      /* px, not rem: a theme's root size must not resize the poll */
	font-family: var(--cue-body);
	color: var(--cue-teal);
	text-align: right;
}


/* The design must not inherit the theme's typography: themes commonly set a
   lighter weight and tightened letter-spacing on body text, which changes
   where lines wrap. The specific rules below re-apply the letter-spacing this
   design does want (the eyebrow and the LIVE badge). */
.penta-poll-cue, .penta-poll-cue * {
  letter-spacing: normal; word-spacing: normal; font-weight: 400;
  text-wrap: wrap;        /* themes set text-wrap:pretty/balance, which re-breaks the lines */
  hyphens: manual; overflow-wrap: normal; word-break: normal;
}
.penta-poll-cue .penta-poll-question, .penta-poll-cue .penta-poll-live,
.penta-poll-cue .penta-poll-eyebrow, .penta-poll-cue .penta-poll-count,
.penta-poll-cue .penta-poll-percent { font-weight: 700; }
.penta-poll-cue .penta-poll-note { font-weight: 600; }

/* ---------- the panel around the card (optional: card="yes") ---------- */
.penta-poll-cue.has-frame {
	border: 1px solid rgba(202, 211, 193, .35);
	padding: 26px 26px 24px;
	background: transparent;
}
.penta-poll-cue .penta-poll-eyebrow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: 0 0 16px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--cue-berry);
}

/* the live dot */
.penta-poll-cue .penta-poll-live {
	flex: none;
	margin-top: 4px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	line-height: 1.55;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cue-berry);
	flex: none;
}
.penta-poll-cue .penta-poll-live::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cue-orange);
	animation: penta-poll-pulse 1.6s ease-in-out infinite;
}
@keyframes penta-poll-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50%      { transform: scale(1.6); opacity: .35; }
}

/* ---------- the card ---------- */
.penta-poll-cue .penta-poll-card { font-size:16px; line-height:1.55; color:#1a1a1a; }
.penta-poll-cue .penta-poll-card {
	background: var(--cue-card-bg);
	border: 1px solid var(--cue-mint);
	border-radius: var(--cue-radius);
	padding: 38px 40px 34px;
	box-shadow: 0 18px 44px rgba(13, 73, 64, .12);
	position: relative;
	z-index: 2;
}

.penta-poll-cue .penta-poll-question {
	font-family: var(--cue-display);
	font-size: clamp(19px, 2.2vw, 23px);
	line-height: 1.35;
	color: var(--cue-teal);
	margin: 0 0 22px;
	padding-inline-end: 70px;              /* room for the LIVE badge (mirrors itself) */
	text-align: right;
}
.penta-poll-cue .penta-poll-intro { margin: -12px 0 18px; font-size: 14px; color: var(--cue-muted); }

/* ---------- the answers ---------- */
.penta-poll-cue .penta-poll-options { display: grid; gap: 10px; }

.penta-poll-cue .penta-poll-option {
	position: relative;
	display: flex;
	grid-template-columns: none;
	align-items: center;
	gap: 9px;
	padding: 14px;
	border: 1.5px solid var(--cue-mint);
	border-radius: var(--cue-radius);
	background: var(--cue-cloud);
	font-size: 13.5px;
	cursor: pointer;
	overflow: hidden;
	color: #1a1a1a;        /* the row's own ink, so nothing is inherited from the theme */
	line-height: 1.55;
	transition: border-color .25s ease, background-color .25s ease;
}
.penta-poll-cue .penta-poll-option:hover { border-color: var(--cue-teal); }
.penta-poll-cue .penta-poll-option:focus-within { outline: 2px solid var(--cue-teal); outline-offset: 2px; }
.penta-poll-cue.has-voted .penta-poll-option,
.penta-poll-cue.is-closed .penta-poll-option { cursor: default; }

.penta-poll-cue, .penta-poll-cue *, .penta-poll-cue *::before, .penta-poll-cue *::after { box-sizing: border-box; }
.penta-poll-cue .penta-poll-mark {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid var(--cue-blush);
	background: #fff;
	position: relative;
	z-index: 1;
	flex: none;
	transition: border-color .25s ease;
}
.penta-poll-cue .penta-poll-option.is-chosen { border-color: var(--cue-teal); background: #fff; }
.penta-poll-cue .penta-poll-option.is-chosen .penta-poll-mark {
	border-color: var(--cue-teal); background: #fff;
}
/* the base stylesheet tints the chosen row grey; this skin keeps it mint */
.penta-poll-cue .penta-poll-option.is-chosen .penta-poll-fill { background: var(--cue-mint); }

.penta-poll-cue .penta-poll-option.is-chosen .penta-poll-mark::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--cue-teal);
}

.penta-poll-cue .penta-poll-label {
	position: relative; z-index: 1; flex: 1 1 0%;
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	overflow: hidden;
	color: #1a1a1a; font-size: 13.5px; line-height: 1.55;
}
/* the design keeps each answer on one line and lets the label clip anything
   that does not fit, rather than wrapping the row onto two lines */
.penta-poll-cue .penta-poll-text { min-width: auto; white-space: nowrap; }

.penta-poll-cue .penta-poll-bar { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity .3s ease; }
.penta-poll-cue .penta-poll-fill {
	display: block;
	height: 100%;
	width: 0;
	margin-inline-start: auto;             /* the bar grows from the right */
	background: var(--cue-mint);
	transition: width .7s cubic-bezier(.22, 1, .36, 1);
}
.penta-poll-cue .penta-poll-percent {
	position: relative;
	z-index: 1;
	direction: ltr;                        /* 34% reads the same in any language */
	unicode-bidi: isolate;
	font-size: 14px;
	line-height: 1.55;
	font-weight: 700;
	color: var(--cue-teal);
	white-space: nowrap;
	opacity: 1;
	font-variant-numeric: tabular-nums;
	transition: none;
}
.penta-poll-cue.has-voted .penta-poll-bar,
.penta-poll-cue.is-closed .penta-poll-bar,
.penta-poll-cue.penta-poll-results-only .penta-poll-bar { opacity: 1; }
.penta-poll-cue.has-voted .penta-poll-percent,
.penta-poll-cue.is-closed .penta-poll-percent,
.penta-poll-cue.penta-poll-results-only .penta-poll-percent { opacity: 1; }

/* ---------- note and total ---------- */
.penta-poll-cue .penta-poll-note {
	margin: 18px 0 0;
	color: var(--cue-muted);
	font-family: var(--cue-hand);
	font-weight: 600;
	font-size: 16px;
	line-height: 2.1;      /* Arabic hand-written faces are tall: 1.4 makes lines touch */
	color: var(--cue-muted);
	opacity: 1;
	min-height: 1.4em;
}
.penta-poll-cue .penta-poll-total {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 32px 0 0;
	font-size: 16px;
	line-height: 1.55;
	color: #1a1a1a;
	opacity: 1;
}
.penta-poll-cue .penta-poll-count {
	direction: ltr;
	unicode-bidi: isolate;
	font-family: var(--cue-hand);
	font-weight: 700;
	font-size: 44px;
	line-height: 1;
	color: var(--cue-orange);
}
.penta-poll-cue .penta-poll-total-note { display: block; font-size: 13px; line-height: 1.35; color: var(--cue-muted); }

.penta-poll-cue.is-saving { opacity: .75; pointer-events: none; }
.penta-poll-cue .penta-poll-closed-note { margin: 0 0 14px; font-size: 13px; color: var(--cue-muted); }
.penta-poll-cue .penta-poll-submit {
	margin-top: 16px;
	background: var(--cue-orange);
	color: #fff;
	border: 0;
	padding: 12px 22px;
	font: inherit;
	cursor: pointer;
}

/* ---------- on a dark background: theme="dark" ----------
   Only what sits OUTSIDE the card changes colour. The card itself stays light,
   as it does in the banner - so the answers inside must keep their dark ink. */
.penta-poll-cue.is-dark { color: var(--cue-cloud); }
.penta-poll-cue.is-dark .penta-poll-card { color: #1a1a1a; }
.penta-poll-cue.is-dark.has-frame { border-color: rgba(242, 242, 233, .22); }
.penta-poll-cue.is-dark .penta-poll-eyebrow { color: var(--cue-blush); }
.penta-poll-cue.is-dark .penta-poll-total-note { color: var(--cue-muted); }
.penta-poll-cue.is-dark .penta-poll-count { color: var(--cue-orange); }
/* the card itself stays light, as it does in the banner */

/* ---------- small screens ---------- */
@media (max-width: 640px) {
	.penta-poll-cue .penta-poll-card { padding: 26px 22px 24px; }
	.penta-poll-cue .penta-poll-question { font-size: 19px; padding-inline-end: 62px; }
	.penta-poll-cue .penta-poll-count { font-size: 36px; }
	.penta-poll-cue.has-frame { padding: 20px 18px 18px; }
}

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

/* fonts="theme" on the shortcode: inherit the theme's faces instead of the
   bundled ones, for a site that already serves this type. */
.penta-poll-cue.fonts-theme{ --cue-display:inherit; --cue-body:inherit; --cue-hand:inherit; }
