/**
 * Alpha News Polls — front-end styles.
 * Visual reference: استطلاع همبريس.
 *
 * @package Alpha_News_Polls
 */

.alpha-news-poll {
	--anp-primary: var(--alpha-primary, #1e22b4);
	--anp-border: var(--alpha-border, #e7e6f7);
	--anp-text: var(--alpha-text, #333);
	--anp-heading: var(--alpha-heading, #232323);
	font-family: var(--alpha-font-body, inherit);
	color: var(--anp-text);
	direction: rtl;
	text-align: right;
}

/* -------------------------------------------------------------------------
 * Question
 * ------------------------------------------------------------------------- */
.alpha-news-poll__question,
.alpha-news-poll p strong {
	display: block;
	margin: 0 0 1rem;
	font-family: var(--alpha-font-heading, inherit);
	font-weight: 800;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--anp-heading);
}

/* -------------------------------------------------------------------------
 * Answers list
 * ------------------------------------------------------------------------- */
.alpha-news-poll .wp-polls-ul {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.alpha-news-poll .wp-polls-ul li {
	position: relative;
	margin: 0 0 .5rem;
	padding: 0;
	line-height: 1.7;
}

.alpha-news-poll .wp-polls-ul li label {
	cursor: pointer;
	font-size: .95rem;
	color: var(--anp-text);
}

.alpha-news-poll .wp-polls-ul li input[type="radio"],
.alpha-news-poll .wp-polls-ul li input[type="checkbox"] {
	margin-inline-end: .4rem;
	accent-color: var(--anp-primary);
	vertical-align: middle;
}

/* -------------------------------------------------------------------------
 * Results bars
 * ------------------------------------------------------------------------- */
.alpha-news-poll .pollbar {
	position: relative;
	height: 14px;
	margin-top: 4px;
	background: var(--anp-primary);
	border-radius: 2px;
	transition: width .4s ease;
	min-width: 2px;
}

.alpha-news-poll--results .wp-polls-ul li {
	margin-bottom: .85rem;
}

.alpha-news-poll--results .wp-polls-ul li small {
	color: #777;
	font-size: .8rem;
}

/* -------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------- */
.alpha-news-poll__vote-btn,
.alpha-news-poll input.Buttons {
	display: inline-block;
	padding: .5rem 1.5rem;
	background: var(--anp-primary);
	color: #fff;
	border: 0;
	border-radius: 3px;
	font-family: var(--alpha-font-heading, inherit);
	font-weight: 700;
	font-size: .95rem;
	cursor: pointer;
	transition: opacity .2s ease;
}

.alpha-news-poll__vote-btn:hover,
.alpha-news-poll input.Buttons:hover {
	opacity: .88;
}

.alpha-news-poll__result-btn,
.alpha-news-poll a[href="#ViewPollResults"],
.alpha-news-poll a[href="#VotePoll"] {
	display: inline-block;
	margin-top: .5rem;
	color: var(--anp-primary);
	font-size: .9rem;
	text-decoration: none;
}

.alpha-news-poll__result-btn:hover,
.alpha-news-poll a[href="#ViewPollResults"]:hover,
.alpha-news-poll a[href="#VotePoll"]:hover {
	text-decoration: underline;
}

.alpha-news-poll__total {
	text-align: center;
	font-size: .9rem;
	color: #666;
	margin: .75rem 0 0;
}

/* -------------------------------------------------------------------------
 * Archive
 * ------------------------------------------------------------------------- */
.alpha-news-poll-archive__item {
	margin-bottom: 1.75rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--anp-border);
}

.alpha-news-poll-archive__question {
	margin: 0 0 .75rem;
	font-family: var(--alpha-font-heading, inherit);
	font-weight: 800;
	font-size: 1.05rem;
	color: var(--anp-heading);
}

.alpha-news-poll-archive__paging {
	display: flex;
	gap: .4rem;
	justify-content: center;
	margin-top: 1rem;
}

.alpha-news-poll-archive__paging a,
.alpha-news-poll-archive__paging span {
	display: inline-block;
	min-width: 32px;
	padding: .25rem .5rem;
	text-align: center;
	border: 1px solid var(--anp-border);
	border-radius: 3px;
	text-decoration: none;
	color: var(--anp-primary);
}

.alpha-news-poll-archive__paging span.current {
	background: var(--anp-primary);
	color: #fff;
	border-color: var(--anp-primary);
}

/* -------------------------------------------------------------------------
 * Archive page (standalone /pollsarchive/ endpoint)
 * ------------------------------------------------------------------------- */
.alpha-news-polls-archive-page {
	padding: 2rem 0 3rem;
}

.alpha-news-polls-archive-page__inner {
	max-width: 820px;
	margin: 0 auto;
	padding: 0 1rem;
}

.alpha-news-polls-archive-page__title {
	margin: 0 0 1.5rem;
	font-family: var(--alpha-font-heading, inherit);
	font-weight: 800;
	font-size: 1.6rem;
	color: var(--anp-heading);
	border-bottom: 2px solid var(--anp-primary);
	padding-bottom: .5rem;
}

/* -------------------------------------------------------------------------
 * Error / disabled
 * ------------------------------------------------------------------------- */
.alpha-news-poll__error {
	padding: .75rem;
	background: #fdf2f2;
	border: 1px solid #f5c2c2;
	border-radius: 3px;
	color: #a12d2d;
	font-size: .9rem;
}
