/**
 * Hela Skincare Quiz - Premium Frontend Styles
 */

/* Container Setup */
.hsq-quiz-wrapper {
	position: relative;
	width: 100%;
	min-height: 80vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: var(--hsq-quiz-radius, 20px);
	font-family: inherit;
}

/* Backgrounds Layer */
.hsq-quiz-backgrounds {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.hsq-bg-layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center center;
	opacity: 0;
	transition: opacity var(--hsq-speed) ease-in-out;
}

.hsq-bg-layer.hsq-active {
	opacity: 1; /* Note: inline data-bg-opacity will override this in JS */
}

/* Overlay Layer */
.hsq-quiz-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--hsq-overlay, rgba(0,0,0,0.4));
	z-index: 2;
}

/* Content Container */
.hsq-quiz-container {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: var(--hsq-max-width, 600px);
	padding: 40px 20px;
	color: var(--hsq-text, #fff);
	text-align: center;
}

/* Step Typography */
.hsq-question-title {
	font-family: var(--hsq-title-font-family, inherit);
	font-size: var(--hsq-title-font-size, 2.5rem);
	font-weight: var(--hsq-title-font-weight, 300);
	line-height: var(--hsq-title-line-height, 1.2);
	letter-spacing: var(--hsq-title-letter-spacing, 0);
	margin-bottom: 2rem;
	color: var(--hsq-text, #fff);
	text-shadow: var(--hsq-title-shadow, none);
}

@media (max-width: 768px) {
	.hsq-question-title {
		font-size: 2rem;
	}
}

/* Progress & Navigation */
.hsq-progress-row {
	display: flex;
	justify-content: center;
	margin-bottom: 2.5rem;
}

.hsq-progress-circles {
	display: flex;
	gap: var(--hsq-prog-spacing, 15px);
	align-items: center;
}

.hsq-progress-circle {
	width: var(--hsq-prog-size, 30px);
	height: var(--hsq-prog-size, 30px);
	border-radius: var(--hsq-prog-radius, 50%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--hsq-prog-font-family, inherit);
	font-size: var(--hsq-prog-font-size, 0.8rem);
	font-weight: var(--hsq-prog-font-weight, 600);
	transition: all 0.3s ease;
}

/* Inactive */
.hsq-prog-inactive {
	background: var(--hsq-prog-i-bg, transparent);
	color: var(--hsq-prog-i-text, #fff);
	border: var(--hsq-prog-i-border-w, 1px) solid var(--hsq-prog-i-border, rgba(255,255,255,0.65));
}

/* Active */
.hsq-prog-active {
	background: var(--hsq-prog-a-bg, #fff);
	color: var(--hsq-prog-a-text, #000);
	border: 1px solid var(--hsq-prog-a-border, #fff);
	transform: scale(1.15);
	box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* Completed */
.hsq-prog-completed {
	background: var(--hsq-prog-c-bg, rgba(255,255,255,0.5));
	color: var(--hsq-prog-c-text, #fff);
	border: 1px solid var(--hsq-prog-c-border, rgba(255,255,255,0.8));
}

.hsq-step-nav {
	margin-top: 2rem;
	display: flex;
	justify-content: center;
}

.hsq-back-btn {
	background: none;
	border: none;
	color: var(--hsq-text, #fff);
	cursor: pointer;
	padding: 10px;
	font-family: var(--hsq-back-font-family, inherit);
	font-size: var(--hsq-back-font-size, 0.9rem);
	font-weight: var(--hsq-back-font-weight, 400);
	text-shadow: var(--hsq-back-shadow, none);
	opacity: 0.6;
	transition: opacity 0.3s ease;
}

.hsq-back-btn:hover {
	opacity: 1;
}

/* Answers Grid */
.hsq-answers-grid {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.hsq-answer-btn {
	background: var(--hsq-btn-bg, transparent);
	border: var(--hsq-btn-border-width, 1px) solid var(--hsq-btn-border, #fff);
	color: var(--hsq-btn-text, #fff);
	padding: 15px 25px;
	font-family: var(--hsq-btn-font-family, inherit);
	font-size: var(--hsq-btn-font-size, 1.1rem);
	font-weight: var(--hsq-btn-font-weight, 400);
	line-height: var(--hsq-btn-line-height, 1.5);
	letter-spacing: var(--hsq-btn-letter-spacing, 0);
	text-transform: var(--hsq-btn-text-transform, none);
	border-radius: var(--hsq-btn-radius, 12px);
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
	text-align: center;
}

.hsq-answer-btn:hover {
	background: var(--hsq-btn-hover-bg, rgba(255,255,255,0.2));
	color: var(--hsq-btn-hover-text, #fff);
	border-color: var(--hsq-btn-hover-border, #fff);
}

.hsq-answer-btn:active, .hsq-answer-btn.hsq-selected {
	background: var(--hsq-btn-active-bg, rgba(255,255,255,0.25));
	color: var(--hsq-btn-active-text, #fff);
	border-color: var(--hsq-btn-active-border, #fff);
}

/* Result Screen */
.hsq-result-title {
	font-family: var(--hsq-title-font-family, inherit);
	font-size: var(--hsq-title-font-size, 3rem);
	font-weight: var(--hsq-title-font-weight, 300);
	line-height: var(--hsq-title-line-height, 1.2);
	margin-bottom: 1rem;
	color: var(--hsq-text, #fff);
	text-shadow: var(--hsq-title-shadow, none);
}

.hsq-result-description {
	font-size: 1.1rem;
	line-height: 1.6;
	margin-bottom: 2rem;
	opacity: 0.9;
}

.hsq-spf-notice {
	background: rgba(255, 204, 0, 0.2);
	border-left: 4px solid #ffcc00;
	padding: 15px;
	margin-bottom: 2rem;
	font-size: 0.95rem;
	text-align: left;
}

/* Routines Display */
.hsq-routines-wrapper {
	text-align: left;
}

.hsq-routine-segment {
	margin-bottom: 2rem;
	background: rgba(255, 255, 255, 0.1);
	border-radius: var(--hsq-quiz-radius, 4px);
	padding: 20px;
	backdrop-filter: blur(10px);
}

.hsq-routine-segment h3 {
	font-size: 1.5rem;
	margin-top: 0;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid rgba(255,255,255,0.2);
	padding-bottom: 10px;
	color: var(--hsq-text, #fff);
}

/* Products Grid */
.hsq-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 15px;
}

.hsq-product-card {
	background: #fff;
	color: #333;
	border-radius: var(--hsq-quiz-radius, 4px);
	padding: 10px;
	text-align: center;
	text-decoration: none;
	transition: transform 0.3s ease;
}

.hsq-product-card:hover {
	transform: translateY(-5px);
}

.hsq-product-card img {
	max-width: 100%;
	height: auto;
	margin-bottom: 10px;
	border-radius: var(--hsq-quiz-radius, 4px);
}

.hsq-product-title {
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
	color: #333;
}

.hsq-product-price {
	font-size: 0.85rem;
	color: #666;
}

/* Actions */
.hsq-result-actions {
	margin-top: 3rem;
	display: flex;
	flex-direction: column;
	gap: 15px;
	align-items: center;
}

.hsq-btn-primary {
	background: var(--hsq-btn-bg, #000);
	color: var(--hsq-btn-text, #fff);
	border: none;
	padding: 18px 40px;
	font-family: var(--hsq-btn-font-family, inherit);
	font-size: var(--hsq-btn-font-size, 1.2rem);
	font-weight: var(--hsq-btn-font-weight, 400);
	text-transform: var(--hsq-btn-text-transform, uppercase);
	letter-spacing: var(--hsq-btn-letter-spacing, 1px);
	border-radius: var(--hsq-btn-radius, 4px);
	cursor: pointer;
	transition: opacity 0.3s ease;
	width: 100%;
	max-width: 400px;
}

.hsq-btn-primary:hover {
	opacity: 0.8;
}

.hsq-btn-secondary {
	background: transparent;
	color: var(--hsq-text, #fff);
	border: none;
	padding: 10px;
	font-size: 1rem;
	cursor: pointer;
	text-decoration: underline;
}

/* Transitions & States */
.hsq-hidden {
	display: none !important;
}

.hsq-step {
	animation: hsqFadeIn 0.5s ease forwards;
}

@keyframes hsqFadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Spinner */
.hsq-spinner {
	width: 50px;
	height: 50px;
	border: 3px solid rgba(255,255,255,0.3);
	border-radius: 50%;
	border-top-color: var(--hsq-text, #fff);
	animation: spin 1s ease-in-out infinite;
	margin: 0 auto 20px;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}
