/* EIndiaTech Magazine — Quiz / Poll page (v2.17.0)
   Clean look: picture on top, white card, coloured question bubble, round choices. */

.eimag-slide-quiz {
	background: #0b0b0f;
	justify-content: flex-start;
}

.eimag-quiz {
	--eq-color: #932b22;
	--eimag-accent: #e1306c;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
	background: #0b0b0f;
	color: #1a1a22;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	overflow: hidden;
	box-sizing: border-box;
}
.eimag-quiz *,
.eimag-quiz *::before,
.eimag-quiz *::after { box-sizing: border-box; }

/* [magazine_quiz] on a normal page: a phone-shaped card */
.eimag-quiz-embed .eimag-quiz {
	height: auto;
	min-height: 560px;
	max-width: 480px;
	margin: 0 auto;
	border-radius: 22px;
}

.eimag-quiz-media {
	flex: 0 0 36%;
	max-height: 38%;
	overflow: hidden;
	background: #17171d;
	position: relative;
}
.eimag-quiz-embed .eimag-quiz-media { flex-basis: 220px; max-height: none; }
.eimag-quiz-media:empty { display: none; }
.eimag-quiz-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eimag-quiz-card {
	flex: 1;
	min-height: 0;
	background: #fff;
	border-radius: 26px 26px 0 0;
	margin-top: -20px;
	position: relative;
	display: flex;
	flex-direction: column;
	box-shadow: 0 -6px 20px rgba( 0, 0, 0, 0.18 );
}
.eimag-quiz-media:empty + .eimag-quiz-card { margin-top: 0; border-radius: 0; box-shadow: none; }

.eimag-quiz-stage {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 22px 18px 34px;
}

/* progress */
.eimag-quiz-progress {
	display: flex;
	align-items: center;
	gap: 5px;
	margin: 0 6px 16px;
}
.eimag-quiz-progress i {
	flex: 1;
	height: 4px;
	border-radius: 4px;
	background: #e6e6ea;
}
.eimag-quiz-progress i.is-done { background: var( --eq-color ); }
.eimag-quiz-progress i.is-now { background: var( --eq-color ); opacity: 0.55; }
.eimag-quiz-count {
	font-size: 0.72rem;
	color: #8a8a94;
	white-space: nowrap;
	margin-left: 6px;
}

/* the coloured question bubble */
.eimag-quiz-q {
	background: var( --eq-color );
	color: #fff;
	text-align: center;
	font-size: 1.08rem;
	line-height: 1.38;
	font-weight: 500;
	padding: 18px 22px;
	border-radius: 34px;
	margin: 0 0 22px;
	box-shadow: 0 6px 14px rgba( 0, 0, 0, 0.22 );
}

/* choices */
.eimag-quiz-opts {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0 4px;
}
.eimag-quiz-opt {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	text-align: left;
	font: inherit;
	font-size: 1.05rem;
	color: #4a4a52;
	background: #fff;
	border: 2px solid #dcdce1;
	border-radius: 40px;
	padding: 14px 18px;
	min-height: 52px;
	cursor: pointer;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
	transition: border-color 0.15s, background 0.15s;
}
.eimag-quiz-opt::before {
	content: "";
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid #dedee3;
	background: #fff;
	position: relative;
	z-index: 1;
	transition: all 0.15s;
}
.eimag-quiz-opt-text { position: relative; z-index: 1; flex: 1; }
.eimag-quiz-opt-pct {
	position: relative;
	z-index: 1;
	font-weight: 700;
	font-size: 0.92rem;
	color: #555;
	margin-left: auto;
}
.eimag-quiz-opt-bar {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: rgba( 147, 43, 34, 0.13 );
	transition: width 0.55s ease;
	z-index: 0;
}
.eimag-quiz-opt:hover:not( :disabled ) { border-color: #bdbdc6; }
.eimag-quiz-opt:focus-visible { outline: 3px solid rgba( 147, 43, 34, 0.35 ); outline-offset: 2px; }
.eimag-quiz-opt.is-picked { border-color: var( --eq-color ); }
.eimag-quiz-opt.is-picked::before {
	border-color: var( --eq-color );
	background: radial-gradient( circle, var( --eq-color ) 0 46%, #fff 50% );
}
.eimag-quiz-opt.is-right { border-color: #1f9d55; background: #eefaf3; }
.eimag-quiz-opt.is-right::before { border-color: #1f9d55; background: #1f9d55; }
.eimag-quiz-opt.is-wrong { border-color: #d64545; background: #fdefef; }
.eimag-quiz-opt.is-wrong::before { border-color: #d64545; background: #d64545; }
.eimag-quiz-opt:disabled { cursor: default; }

.eimag-quiz-explain {
	margin: 16px 6px 0;
	padding: 12px 14px;
	background: #f6f6f8;
	border-radius: 14px;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #44444c;
}

.eimag-quiz-actions { margin: 20px 4px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.eimag-quiz-btn {
	appearance: none;
	-webkit-appearance: none;
	flex: 1 1 140px;
	border: 0;
	border-radius: 30px;
	padding: 14px 20px;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	background: var( --eq-color );
	cursor: pointer;
	text-align: center;
}
.eimag-quiz-btn:disabled { opacity: 0.55; cursor: default; }
.eimag-quiz-btn.is-ghost { background: #fff; color: var( --eq-color ); border: 2px solid var( --eq-color ); }
.eimag-quiz-link {
	display: block;
	margin: 14px auto 0;
	background: none;
	border: 0;
	color: #7a7a84;
	font: inherit;
	font-size: 0.9rem;
	text-decoration: underline;
	cursor: pointer;
}

/* "who took this" form + result headings */
.eimag-quiz-h {
	font-size: 1.28rem;
	font-weight: 800;
	margin: 4px 6px 6px;
	color: #1a1a22;
	text-align: center;
}
.eimag-quiz-sub {
	margin: 0 6px 18px;
	color: #6b6b75;
	font-size: 0.92rem;
	line-height: 1.45;
	text-align: center;
}
.eimag-quiz-form { padding: 0 4px; }
.eimag-quiz .eimag-subscribe-field input:not( [type="checkbox"] ):not( [type="radio"] ),
.eimag-quiz .eimag-subscribe-field textarea,
.eimag-quiz .eimag-subscribe-field select {
	border-radius: 14px;
	border: 1.5px solid #d8d8de;
	background: #fff;
	color: #1a1a22;
}
.eimag-quiz .eimag-subscribe-field label,
.eimag-quiz .eimag-field-group legend { color: #55555e; opacity: 1; }
.eimag-quiz .eimag-subscribe-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.eimag-quiz-error { color: #d64545; font-size: 0.88rem; margin: 10px 6px 0; text-align: center; }
.eimag-quiz [hidden] { display: none !important; }

/* score */
.eimag-quiz-score {
	width: 118px;
	height: 118px;
	margin: 2px auto 10px;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: conic-gradient( var( --eq-color ) calc( var( --eq-pct, 0 ) * 1% ), #ececf0 0 );
	position: relative;
}
.eimag-quiz-score::before {
	content: "";
	position: absolute;
	inset: 9px;
	border-radius: 50%;
	background: #fff;
}
.eimag-quiz-score b,
.eimag-quiz-score span { position: relative; z-index: 1; }
.eimag-quiz-score b { font-size: 1.7rem; line-height: 1.1; color: #1a1a22; }
.eimag-quiz-score span { font-size: 0.72rem; color: #8a8a94; letter-spacing: 0.06em; }

/* certificate */
.eimag-quiz-cert {
	margin: 14px auto 0;
	max-width: 300px;
}
.eimag-quiz-cert img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 8px 26px rgba( 0, 0, 0, 0.22 );
	background: #fffaf0;
	-webkit-touch-callout: default;
	user-select: auto;
}
.eimag-quiz-namebox { margin: 16px 4px 0; }
.eimag-quiz-namebox label { display: block; font-size: 0.78rem; font-weight: 600; color: #55555e; margin: 0 0 6px 4px; }
.eimag-quiz-namebox input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1.5px solid #d8d8de;
	font: inherit;
	font-size: 1rem;
	color: #1a1a22;
	background: #fff;
}
.eimag-quiz-namebox input:focus { outline: none; border-color: var( --eq-color ); }
.eimag-quiz-toast {
	text-align: center;
	font-size: 0.85rem;
	color: #1f9d55;
	margin: 10px 0 0;
	min-height: 1.2em;
}

/* poll summary */
.eimag-quiz-sum { margin: 22px 4px 0; border-top: 1px solid #ececf0; padding-top: 16px; }
.eimag-quiz-sum h4 { margin: 0 0 12px; font-size: 0.95rem; color: #1a1a22; }
.eimag-quiz-sum-q { margin: 0 0 16px; }
.eimag-quiz-sum-q p { margin: 0 0 8px; font-weight: 600; font-size: 0.9rem; color: #33333a; }
.eimag-quiz-sum-row { position: relative; border-radius: 10px; background: #f3f3f6; margin: 0 0 6px; padding: 8px 12px; font-size: 0.85rem; display: flex; justify-content: space-between; gap: 10px; overflow: hidden; color: #44444c; }
.eimag-quiz-sum-row i { position: absolute; inset: 0 auto 0 0; background: rgba( 147, 43, 34, 0.16 ); }
.eimag-quiz-sum-row span { position: relative; }
.eimag-quiz-sum-row.is-mine { box-shadow: inset 0 0 0 2px var( --eq-color ); }

@media ( max-height: 640px ) {
	.eimag-quiz-q { font-size: 0.98rem; padding: 14px 18px; margin-bottom: 14px; }
	.eimag-quiz-opt { padding: 10px 16px; min-height: 46px; font-size: 0.98rem; }
	.eimag-quiz-opts { gap: 9px; }
}
@media ( prefers-reduced-motion: reduce ) {
	.eimag-quiz-opt-bar, .eimag-quiz-opt, .eimag-quiz-opt::before { transition: none; }
}

/* ---- v2.17.1: one screen, no scrolling; plain (not uppercase) text ----
   --eq-s is set by the script (1 = full size, smaller on short screens). */
.eimag-quiz,
.eimag-quiz button,
.eimag-quiz input {
	text-transform: none !important;
	letter-spacing: normal !important;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
.eimag-quiz-media { flex: 0 0 28%; max-height: none; }
.eimag-quiz-embed .eimag-quiz-media { flex-basis: 220px; }
.eimag-quiz-stage { padding: calc( 18px * var( --eq-s, 1 ) ) 16px calc( 16px * var( --eq-s, 1 ) ); }
.eimag-quiz-progress { margin-bottom: calc( 12px * var( --eq-s, 1 ) ); }
.eimag-quiz-q {
	font-size: calc( 1.05rem * var( --eq-s, 1 ) );
	font-weight: 600 !important;
	line-height: 1.3;
	padding: calc( 14px * var( --eq-s, 1 ) ) 20px;
	margin-bottom: calc( 16px * var( --eq-s, 1 ) );
}
.eimag-quiz-opts { gap: calc( 10px * var( --eq-s, 1 ) ); }
.eimag-quiz-opt {
	font-size: calc( 1rem * var( --eq-s, 1 ) );
	font-weight: 500 !important;
	line-height: 1.25;
	padding: calc( 11px * var( --eq-s, 1 ) ) 16px;
	min-height: calc( 46px * var( --eq-s, 1 ) );
	gap: calc( 12px * var( --eq-s, 1 ) );
}
.eimag-quiz-opt::before { flex-basis: calc( 22px * var( --eq-s, 1 ) ); width: calc( 22px * var( --eq-s, 1 ) ); height: calc( 22px * var( --eq-s, 1 ) ); }
.eimag-quiz-opt-pct { font-size: calc( 0.9rem * var( --eq-s, 1 ) ); }
.eimag-quiz-explain { font-size: calc( 0.85rem * var( --eq-s, 1 ) ); margin-top: calc( 10px * var( --eq-s, 1 ) ); padding: calc( 9px * var( --eq-s, 1 ) ) 12px; }
.eimag-quiz-actions { margin-top: calc( 14px * var( --eq-s, 1 ) ); }
.eimag-quiz-btn { font-size: calc( 1rem * var( --eq-s, 1 ) ); font-weight: 700 !important; padding: calc( 13px * var( --eq-s, 1 ) ) 18px; }

/* ---- v2.17.2: no scrolling anywhere — swipe moves to the next magazine page ---- */
.eimag-quiz-stage { overflow: hidden !important; overscroll-behavior: auto; touch-action: pan-y; }
.eimag-quiz-stage.is-result {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	padding: 14px 16px 12px;
}
.eimag-quiz-rh { margin: 0; text-align: center; font-size: 1.15rem; font-weight: 800; color: #1a1a22; line-height: 1.2; }
.eimag-quiz-rsub { margin: 0; text-align: center; font-size: 0.82rem; color: #6b6b75; line-height: 1.3; }
.eimag-quiz-grow { flex: 1; }
.eimag-quiz-stage.is-result .eimag-quiz-cert {
	flex: 1;
	min-height: 0;
	max-width: none;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.eimag-quiz-stage.is-result .eimag-quiz-cert img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.eimag-quiz-nameinput {
	width: 100%;
	padding: 9px 14px;
	border-radius: 24px;
	border: 1.5px solid #d8d8de;
	font-size: 16px !important; /* 16px stops iPhones zooming in */
	color: #1a1a22;
	background: #fff;
	text-align: center;
}
.eimag-quiz-nameinput:focus { outline: none; border-color: var( --eq-color ); }
.eimag-quiz-bar { display: flex; align-items: center; justify-content: center; gap: 18px; }
.eimag-quiz-ico {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	color: #33333a;
	cursor: pointer;
	font: inherit;
	-webkit-tap-highlight-color: transparent;
}
.eimag-quiz-ico-c {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var( --eq-color );
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 8px rgba( 0, 0, 0, 0.25 );
}
.eimag-quiz-ico-l { font-size: 0.7rem; font-weight: 600; }
.eimag-quiz-resultlink {
	flex: 1;
	min-width: 0;
	text-align: center;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.2;
	color: var( --eq-color ) !important;
	border: 2px solid var( --eq-color );
	border-radius: 28px;
	padding: 11px 12px;
}
.eimag-quiz-stage.is-result .eimag-quiz-toast { margin: -2px 0 0; min-height: 0; font-size: 0.78rem; }
.eimag-quiz-rowlink { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.eimag-quiz-rowlink .eimag-quiz-link { margin: 0 auto; }
.eimag-quiz-stage.is-result .eimag-quiz-link { margin: 0 auto; padding: 0; font-size: 0.8rem; }
/* "who took this" form must also fit */
.eimag-quiz-form .eimag-subscribe-field { margin-bottom: calc( 10px * var( --eq-s, 1 ) ); }
.eimag-quiz-form input:not( [type="checkbox"] ):not( [type="radio"] ) { padding-top: calc( 10px * var( --eq-s, 1 ) ) !important; padding-bottom: calc( 10px * var( --eq-s, 1 ) ) !important; font-size: 16px; }
.eimag-quiz-h { font-size: calc( 1.2rem * var( --eq-s, 1 ) ); }
.eimag-quiz-sub { font-size: calc( 0.88rem * var( --eq-s, 1 ) ); margin-bottom: calc( 12px * var( --eq-s, 1 ) ); }

/* ---- v2.17.3: background colour, full-screen, reset ---- */
.eimag-quiz-card { background: var( --eq-bg, #fff ); }
.eimag-quiz-rh, .eimag-quiz-h { color: var( --eq-ink, #1a1a22 ); }
.eimag-quiz-rsub, .eimag-quiz-sub, .eimag-quiz-count, .eimag-quiz-link { color: var( --eq-ink2, #6b6b75 ); }
.eimag-quiz-ico { color: var( --eq-ink, #33333a ); }
.eimag-quiz-progress i { background: var( --eq-line, #e6e6ea ); }
.eimag-quiz-progress i.is-done, .eimag-quiz-progress i.is-now { background: var( --eq-color ); }
.eimag-quiz .eimag-subscribe-field label, .eimag-quiz .eimag-field-group legend { color: var( --eq-ink2, #55555e ); }
.eimag-quiz-bar { gap: 14px; flex-wrap: nowrap; }
.eimag-quiz-resultlink { flex: 1 1 0; }
/* Fill the whole page: no space above/below even in Clean Card with Header/Footer space */
.eimag-cleancard .eimag-slide.eimag-slide-quiz-full {
	margin: 0;
	height: 100%;
	border-radius: 0;
	box-shadow: none;
	scroll-margin-top: 0;
}
.eimag-slide-quiz-full .eimag-quiz { border-radius: 0; }

.eimag-quiz-resultlink { color: var( --eq-link, var( --eq-color ) ) !important; border-color: var( --eq-link, var( --eq-color ) ); }
.eimag-quiz-ico-c { box-shadow: 0 3px 8px rgba( 0, 0, 0, 0.25 ), 0 0 0 2px var( --eq-line, transparent ); }

/* ---- v2.17.4: header picture is never cropped ---- */
.eimag-quiz-media {
	flex: 0 0 auto !important;
	max-height: none !important;
	position: relative;
	overflow: hidden;
	background: #0b0b0f;
}
.eimag-quiz-media::before {
	content: "";
	position: absolute;
	inset: -24px;
	background: var( --eq-img ) center / cover no-repeat;
	filter: blur( 18px );
	opacity: 0.85;
}
.eimag-quiz-media img {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	max-height: var( --eq-mh, none );
	object-fit: contain !important;
}
.eimag-quiz-embed .eimag-quiz-media { flex-basis: auto !important; }
.eimag-quiz-card { margin-top: 0 !important; border-radius: 22px 22px 0 0; }

/* ---- v2.18.0: live elements (quiz / form / subscribe / shortcode) as a carousel swipe ---- */
.eimag-page-imagecarousel-item.eimag-carousel-embed {
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	position: relative;
	background: #fff;
	padding-bottom: 30px; /* room for the carousel dots */
	box-sizing: border-box;
}
.eimag-carousel-embed > .eimag-quiz { flex: 1; height: auto; min-height: 0; border-radius: 0; }
.eimag-carousel-embed > .eimag-embed-sub { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.eimag-carousel-embed > .eimag-embed-sc { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; color: #1a1a22; }
/* the like / share / save stack would sit on top of the live element */
.eimag-slide.eimag-embed-active .eimag-reel-actions { display: none !important; }
