/* Glow Quiz — Frontend Styles
   All colors/fonts come from CSS variables set dynamically from the admin settings,
   so this always matches the site without editing code. */

/* Safety-net reset so padding/borders are always included in element widths.
   This is what was causing answer text to get clipped at the card's edge on
   mobile — a button with width:100% plus padding, without border-box, renders
   wider than its container and gets cut off. */
.glow-quiz-overlay, .glow-quiz-overlay *,
.glow-quiz-inline-wrap, .glow-quiz-inline-wrap * {
	box-sizing: border-box;
}

.glow-quiz-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 16, 14, 0.55);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 20px;
	font-family: var(--glow-font);
	box-sizing: border-box;
}
.glow-quiz-overlay.is-open { display: flex; }

.glow-quiz-modal {
	background: var(--glow-bg);
	color: var(--glow-text);
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.25);
	position: relative;
	padding: 28px 26px 30px;
	box-sizing: border-box;
	animation: glowQuizPop .25s ease-out;
}
@keyframes glowQuizPop {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.glow-quiz-close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: transparent;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: var(--glow-text);
	opacity: .6;
	padding: 4px 8px;
}
.glow-quiz-close:hover { opacity: 1; }

.glow-quiz-header { text-align: center; margin-bottom: 10px; }
.glow-quiz-logo { max-height: 46px; max-width: 200px; margin: 0 auto; display: inline-block; }

.glow-quiz-intro-image {
	width: 100%;
	max-height: 260px;
	object-fit: cover;
	border-radius: 12px;
	margin-bottom: 18px;
	display: block;
}

.glow-quiz-duration {
	margin-top: 12px;
	font-size: 13px;
	opacity: .7;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--glow-text);
}

.glow-quiz-question-desc {
	font-size: 13.5px;
	opacity: .75;
	margin: 0 0 16px;
	line-height: 1.5;
}

.glow-quiz-progress-wrap {
	margin: 14px 0 20px;
	display: none;
}
.glow-quiz-progress-wrap.is-visible { display: block; }

.glow-quiz-progress {
	height: 5px;
	background: var(--glow-secondary);
	border-radius: 4px;
	overflow: hidden;
}
.glow-quiz-progress-bar {
	height: 100%;
	width: 0%;
	background: var(--glow-primary);
	transition: width .3s ease;
}
.glow-quiz-progress-label {
	font-size: 12.5px;
	opacity: .65;
	margin-top: 6px;
	text-align: center;
}

.glow-quiz-body { text-align: center; }

.glow-quiz-heading { font-size: 21px; font-weight: 600; margin: 6px 0 10px; color: var(--glow-text); }
.glow-quiz-subheading { font-size: 14px; opacity: .8; margin-bottom: 22px; line-height: 1.5; }
.glow-quiz-question {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 18px;
	line-height: 1.4;
	overflow-wrap: break-word;
	word-break: break-word;
}

.glow-quiz-answers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }

.glow-quiz-answer-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: left;
	padding: 13px 16px;
	border-radius: 10px;
	border: 1.5px solid var(--glow-secondary);
	background: var(--glow-secondary);
	color: var(--glow-answer-text);
	font-family: var(--glow-font);
	font-size: 15px;
	line-height: 1.4;
	cursor: pointer;
	overflow-wrap: break-word;
	word-break: break-word;
	white-space: normal;
	transition: border-color .15s ease, transform .1s ease;
}
.glow-quiz-answer-btn:hover {
	border-color: var(--glow-primary);
	transform: translateY(-1px);
}

.glow-quiz-primary-btn {
	display: inline-block;
	padding: 13px 30px;
	border-radius: 30px;
	background: var(--glow-primary);
	color: var(--glow-btn-text);
	border: none;
	font-family: var(--glow-font);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 6px;
}
.glow-quiz-primary-btn:hover { opacity: .9; }

.glow-quiz-back-link {
	display: block;
	margin-top: 16px;
	font-size: 13px;
	color: var(--glow-text);
	opacity: .55;
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: underline;
	font-family: var(--glow-font);
}

.glow-quiz-capture-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.glow-quiz-hp-field {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none;
}
.glow-quiz-input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1.5px solid var(--glow-secondary);
	background: var(--glow-bg);
	color: var(--glow-text);
	font-family: var(--glow-font);
	font-size: 16px;
}
.glow-quiz-input:focus { outline: none; border-color: var(--glow-primary); }
.glow-quiz-capture-error { color: #b3261e; font-size: 13px; text-align: left; }

.glow-quiz-result-title { font-size: 22px; font-weight: 700; margin: 4px 0 12px; }
.glow-quiz-result-desc { font-size: 15px; line-height: 1.6; margin-bottom: 22px; opacity: .9; }

/* Hero / nav trigger button — inherits the same brand color by default,
   safe to override in the theme's own CSS if desired. */
.glow-quiz-hero-btn {
	display: inline-block;
	padding: 14px 34px;
	border-radius: 30px;
	background: var(--glow-primary);
	color: var(--glow-btn-text);
	border: none;
	font-family: var(--glow-font);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}
.glow-quiz-hero-btn:hover { opacity: .9; }

@media (max-width: 480px) {
	.glow-quiz-overlay { padding: 12px; }
	.glow-quiz-modal { padding: 22px 18px 24px; border-radius: 12px; max-height: 92vh; }
	.glow-quiz-question { font-size: 17px; }
	.glow-quiz-heading { font-size: 19px; }
	.glow-quiz-subheading { font-size: 13.5px; }
	.glow-quiz-intro-image { max-height: 180px; }
	.glow-quiz-answer-btn { padding: 12px 14px; font-size: 14.5px; }
	.glow-quiz-primary-btn { width: 100%; box-sizing: border-box; padding: 13px 20px; }
	.glow-quiz-inline-wrap { padding: 12px; }
	.glow-quiz-inline-card { padding: 20px 16px 22px; border-radius: 12px; }
}

@media (max-width: 360px) {
	.glow-quiz-modal, .glow-quiz-inline-card { padding: 16px 14px 18px; }
	.glow-quiz-heading { font-size: 18px; }
	.glow-quiz-question { font-size: 16px; }
	.glow-quiz-intro-image { max-height: 150px; }
}

/* Full-page / embedded version — [glow_quiz_page] shortcode.
   Same internals as the popup, just laid out inline in the page flow
   instead of as a fixed overlay. */
.glow-quiz-inline-wrap {
	display: flex;
	justify-content: center;
	padding: 20px 0;
	font-family: var(--glow-font);
}
.glow-quiz-inline-card {
	background: var(--glow-bg);
	color: var(--glow-text);
	width: 100%;
	max-width: 480px;
	border-radius: 14px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.08);
	padding: 28px 26px 30px;
	box-sizing: border-box;
	overflow-x: hidden;
}
