/*--------------------------------------------------------------
# Test Page Hero
--------------------------------------------------------------*/

.test-hero {
	position: relative;
	padding: 2rem;
	color: var(--color-white);
	overflow: hidden;
}

/* Container for the title/lead + image section (matches home hero) */
.test-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
	z-index: 2;
}

.test-hero__image {
	height: 150px;
	width: 150px;
	flex-shrink: 0;
}

.test-hero__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.test-hero__content {
	text-align: center;
	max-width: 65ch;
}

.test-hero__title {
	font-size: var(--font-size-h1);
	font-weight: 600;
	line-height: 1.2;
	margin-bottom: 1rem;
	color: var(--color-white);
	text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.test-hero__lead {
	font-size: var(--font-size-lg);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
}

/*--------------------------------------------------------------
# Carousel
--------------------------------------------------------------*/

.carousel-wrapper {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2rem 2rem;
	container-type: inline-size;
	position: relative;
	z-index: 2;
}

.carousel-container {
	margin: 0 auto;
	overflow: hidden;
	position: relative;
}

.carousel-track {
	display: flex;
	gap: 16px;
	transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.carousel-card {
	flex: 0 0 100%;
	width: 100%;
	background-color: var(--color-white);
	border-radius: 12px;
	padding: 1.2rem;
	box-sizing: border-box;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	min-height: 180px;
	color: var(--color-text);
    margin-top: 1rem;
}

.carousel-card strong {
	font-size: 1rem;
	color: var(--color-heading);
}

.carousel-card p {
	line-height: 1.4;
	font-size: 0.9375rem;
	margin: 0 0 0.5rem;
}

.carousel-card p:last-child {
	margin-bottom: 0;
}

.carousel-card a {
	color: var(--color-primary-dark);
	text-decoration: none;
	border-bottom: 1px solid var(--color-underline);
}

.carousel-card a:hover {
	border-bottom-color: var(--color-primary);
}

/* Navigation Dots */
.carousel-nav {
	text-align: center;
	padding: 0;
	position: absolute;
	bottom: 8px;
	width: 100%;
}

.carousel-nav .dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin: 0 5px;
	background-color: #eee;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.carousel-nav .dot.active {
	background-color: #999;
}

@media (max-width: 480px) {
    .carousel-wrapper {
        padding: 0 0 1rem 0;
        margin-top: 0;
    }
}
@container (min-width: 600px) {
	.carousel-card {
		flex-basis: calc(50% - 8px);
	}
    .carousel-wrapper{
        padding: 0;
    }
}

@container (min-width: 900px) {
	.carousel-card {
		flex-basis: calc(25% - 12px);
	}

	.carousel-nav {
		display: none !important;
	}
}

/*--------------------------------------------------------------
# Rating Bar Section
--------------------------------------------------------------*/

.test-hero__rating {
	width: 100%;
	background-color: #FDF5B7;
	padding: 0.5rem;
	text-align: center;
	position: relative;
	z-index: 2;
	margin-left: -2rem;
	margin-right: -2rem;
	width: calc(100% + 4rem);
}

/* override the shortcode injected CSS */
.rating-bar{
    justify-content: center;
    color: #444;
}
.average-rating{
    width: 130px !important;
}
/* end override */

/*--------------------------------------------------------------
# Instructions Section
--------------------------------------------------------------*/

.test-hero__instructions {
	width: 100%;
	padding: 1rem 1rem 0;
	text-align: center;
	position: relative;
	z-index: 2;
}

.test-info {
	color: var(--color-white);
	font-size: var(--font-size-lg);
	font-weight: 500;
	margin: 0 0 0.5rem;
}

.test-subinfo {
	color: #E9E9E9;
	font-size: var(--font-size-small);
	font-style: italic;
	margin: 0;
}

/*--------------------------------------------------------------
# Arrow Separator
--------------------------------------------------------------*/

.test-hero__arrow {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	line-height: 0;
	z-index: 1;
	pointer-events: none;
}

.test-hero__arrow svg {
	width: 100%;
	height: 40px;
	display: block;
}

.test-hero__arrow-fill {
	fill: var(--color-background);
}

/*--------------------------------------------------------------
# Desktop Styles
--------------------------------------------------------------*/

@media (min-width: 769px) {
	.test-hero {
		padding-top: 4rem;
		padding-bottom: 6rem;
	}

	/* Inner container matches home page hero layout exactly */
	.test-hero__inner {
		flex-direction: row;
		justify-content: space-between;
		padding: 0;
        gap: 2rem;
	}

	.test-hero__content {
		text-align: left;
		flex: 1;
		order: 1;
	}

	.test-hero__image {
		order: 2;
		flex-basis: 35%;
		max-width: 300px;
		height: auto;
		width: auto;
	}

	.carousel-wrapper {
		margin-top: 0;
		padding: 0 2rem 2rem;
	}

	.test-hero__rating {
		margin-top: 0;
		padding: 1.25rem;
	}

    .test-hero__instructions {
		padding: 2rem 1rem 0 1rem;
	}

	.test-info {
		font-size: var(--font-size-h4);
	}

	.test-hero__arrow svg {
		height: 60px;
	}
}

/*--------------------------------------------------------------
# Test Container (for test content area)
--------------------------------------------------------------*/

.test-container {
	/* Styles for the actual test content go here */
}


/*--------------------------------------------------------------
# Test Questions Styles
--------------------------------------------------------------*/

button.enneagram-answer.selected, #next-button, #initialProgress,.progress-bar {
    background-color: var(--color-primary) !important;
}
button.enneagram-answer:hover {
    background-color: var(--color-primary-dark) !important;
}
#next-button{
    justify-content: center;
}
.nav-button:disabled, .nav-button[disabled] {
    background-color: #cccccc !important;
    color: #666666 !important;
}
#submit-test {
    background: #439A59 !important;
}
#submit-test:hover {
    background: #348549 !important;
}

/*--------------------------------------------------------------
# Elaborazione Test Styles
--------------------------------------------------------------*/

.waiting-text {
    border: none !important;
}
.waiting-text::after {
    height: 0 !important;
}
#loop-container{
    margin-top: 30px !important;
}

/*--------------------------------------------------------------
# Test Result Styles
--------------------------------------------------------------*/

.test-result-image {
    margin: 0 auto;
    width: 100%;
}

.result-header {
    display: flex;
    text-align: center;
}


.result-header .result-intro {
    color: #666;
    font-style: italic;
    font-size: 16px;
}

.result-header .result-type-name {
    font-size: 55px;
    margin: 30px 0 10px 0;
}

.result-header .result-type {
    font-size: 24px;
    margin: 0;
}

#result-content-text {
    padding: 0 10px;
}

@media (max-width: 500px) {
    .result-header .result-type-name {
        font-size: 40px;
        margin: 0;
    }

    .result-header .result-intro {
        font-size: 14px;
    }

}

@media (max-width: 1024px) {
    .result-header {
        flex-direction: column;
    }
}


.test-result-image img {
    display: block !important;
    width: 500px !important;
    margin: 0 auto !important;
}

.rating-box h2 {
    border: none !important;
}
.rating-box h2::after {
    height: 0 !important;
}

p.procons-list {
    margin: 10px 5px !important;
}

p.procons-list::before {
    content: "";
    position: absolute;
    left: -2px;
    height: 7px;
    width: 7px;
    border: 1px solid var(--color-primary);
    border-width: 2px 2px 0 0;
    transform: rotate(45deg);
    margin-top: 13px;
}

.social-share-btn {
    width: auto !important;
}
#bottom-notice {
    position: fixed;
    bottom: 0;
    background: #2275cd;
    text-align: center;
    left: 0;
    right: 0;
    padding: 9px 20px;
    color: white;
    font-size: 12px;
    line-height: 1.5;
    z-index: 99999;
    height: 60px;
    display: none;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -5px 10px 0 #00000040;
}
#bottom-notice .container {
    min-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}
#bottom-notice .info-texts {
    display: flex;
    margin-left: 10px;
    align-items: flex-start;
    margin-right: auto;
}
#bottom-notice .info-title {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Libre Baskerville', sans-serif;
    margin: 0 !important;
}
#bottom-notice .info-btn {
    background: white;
    border-radius: 9999px;
    font-size: 14px;
    padding: 5px 7px;
    margin-right: 4px;
}
#bottom-notice .info-btn a {
    text-decoration: none !important;
}
@media (max-width: 767px) {
    #bottom-notice {
        padding: 0;
        font-size: 18px;
    }
    #bottom-notice .container {
        min-width: 100%;
    }
}

/*--------------------------------------------------------------
# Test styles moved from plugin inline CSS
--------------------------------------------------------------*/

#notice-container {
	display: block;
}

.save-profile {
	font-weight: bold;
	cursor: pointer;
}

.enneagram-questions:last-child {
	border-bottom: 0;
}

#spinner {
	border: 4px solid rgb(255 255 255 / 10%);
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border-top-color: #e1e1e1;
	animation: spin 1s linear infinite;
	margin-right: 10px;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

#reset-message {
	padding: 10px 20px;
	background: white;
	border: 1px solid #e8e8e8;
	border-left: 4px solid #62e662;
}

.enneagram-answers {
	padding: 20px 0;
	width: 100%;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.hidden {
	display: none;
}

.enneagram-answers-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.enneagram-answers-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
}

.question-container {
	padding: 40px 16px;
	background: white;
	opacity: 0.5;
	min-height: 270px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.question-container.disabled {
	pointer-events: none;
}

.question-container.active-question {
	background: #fff;
	opacity: 1 !important;
	position: relative;
	z-index: 10;
	border: dotted 1px #ccc;
	transition: all 0.5s ease-out;
}

.buttons-container {
	display: flex;
	flex-direction: column;
	min-height: 270px;
	justify-content: center;
	padding-top: 80px;
}

.enneagram-answers-container .enneagram-answer {
	border: 2px solid blue;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 2px;
	cursor: pointer;
	transition: 0.12s ease-in-out border;
	padding: 6px;
	background: white;
	-webkit-tap-highlight-color: transparent;
}

.enneagram-answer:focus {
	outline: none;
}

.answer-value-1,
.answer-value-2,
.answer-value-3,
.answer-value-4,
.answer-value-5 {
	min-width: 34px !important;
	min-height: 34px !important;
	width: 34px !important;
	height: 34px !important;
	border-color: rgba(87, 164, 246, 1) !important;
}

.answer-value-1 {
	min-width: var(--answer1-size) !important;
	min-height: var(--answer1-size) !important;
	width: var(--answer1-size) !important;
	height: var(--answer1-size) !important;
	border-color: #57a4f6 !important;
}

.answer-value-2 {
	min-width: var(--answer2-size) !important;
	min-height: var(--answer2-size) !important;
	width: var(--answer2-size) !important;
	height: var(--answer2-size) !important;
	border-color: #499cf5 !important;
}

.answer-value-3 {
	min-width: var(--answer3-size) !important;
	min-height: var(--answer3-size) !important;
	width: var(--answer3-size) !important;
	height: var(--answer3-size) !important;
	border-color: #3c95f4 !important;
}

.answer-value-4 {
	min-width: var(--answer4-size) !important;
	min-height: var(--answer4-size) !important;
	width: var(--answer4-size) !important;
	height: var(--answer4-size) !important;
	border-color: #2e8ef3 !important;
}

.answer-value-5 {
	min-width: var(--answer5-size) !important;
	min-height: var(--answer5-size) !important;
	width: var(--answer5-size) !important;
	height: var(--answer5-size) !important;
	border-color: #2086f2 !important;
}

.check-icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	background: url('/wp-content/uploads/check-icon.svg') no-repeat center center;
	background-size: contain;
	visibility: hidden;
}

.enneagram-answer.selected .check-icon {
	visibility: visible;
}

.molto-text,
.poco-text {
	bottom: 0;
	font-size: 15px;
	font-weight: 400;
	color: #2186f2 !important;
	user-select: none;
	line-height: 0.9;
}

.poco-text {
	margin-right: 15px;
}

.molto-text {
	margin-left: 15px;
}

.test-result-description {
	line-height: 2em;
}

.enneagram-question {
	font-size: 1.125rem;
	font-weight: 400;
	color: #333;
	text-align: center;
	line-height: 1.45;
	user-select: none;
	min-height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 150px;
}

#next-button:focus,
#prev-button:focus {
	outline: 0;
}

#next-button,
#submit-test {
	border: none;
	padding: 14px;
	min-width: 30%;
	margin: 0 auto;
	border-radius: 9999px;
	color: white;
	font-size: 20px;
	font-weight: 500;
	cursor: pointer;
	max-height: 63px;
	flex-direction: row;
	transition: all 0.2s ease-in-out;
}

#progress {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.09);
	background: white;
	padding: 15px 30px;
	display: flex;
	flex-direction: column;
	z-index: 999;
}

#progress p {
	font-size: 12px;
	line-height: 0.9;
	margin: 0;
	text-align: center;
}

.progress-container {
	background: #d2d2d2;
	height: 4px;
	width: 100%;
}

#percentage-text {
	margin-left: 13px;
	color: #0c0d0e;
	font-size: 14px;
	font-weight: 600;
}

.sidebar-type-image {
	max-width: 60% !important;
	display: block;
	margin: 0 auto;
}

.sidebar-type-text {
	margin-bottom: 10px;
	color: #666;
}

.sidebar-type-title {
	text-transform: uppercase;
	font-weight: bold;
	font-size: 26px;
	margin-top: -20px;
	margin-bottom: -20px;
}

@media (max-width: 479px) {
	.poco-text {
		position: absolute;
		bottom: -20px;
		left: 5px;
		width: 90px;
	}

	.molto-text {
		position: absolute;
		bottom: -20px;
		right: 5px;
		width: 90px;
		text-align: right;
	}
}

@media (max-width: 767px) {
	.test-result-title {
		margin-top: -20px;
	}

	.question-container {
		width: 100%;
		border: dotted 1px #eaeaea;
	}

	.question-container.active-question {
		box-shadow: 0 -20px 20px -20px rgba(0, 0, 0, 0.15), 0 25px 20px -20px rgba(0, 0, 0, 0.15);
	}

	#next-button,
	#submit-test {
		min-width: 50% !important;
	}

	.enneagram-question {
		padding: 0 5px !important;
	}

	.enneagram-answers-container {
		gap: 5px;
	}

	#progress {
		padding: 15px;
	}
}

/* Continue Test Modal Styles */
.eg-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.eg-modal {
	background: white;
	border-radius: 12px;
	max-width: 600px;
	width: 100%;
	padding: 40px 50px;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.eg-modal-close {
	position: absolute;
	top: 15px;
	right: 20px;
	background: none;
	border: none;
	font-size: 28px;
	color: #999;
	cursor: pointer;
	padding: 5px;
	line-height: 1;
	transition: color 0.2s;
}

.eg-modal-close:hover {
	color: #333;
}

.eg-modal-title {
	font-family: 'Libre Baskerville', Georgia, serif;
	font-size: 36px;
	font-weight: 400;
	color: #111;
	margin: 0 0 20px 0;
	line-height: 1.2;
}

.eg-modal-description {
	font-size: 18px;
	color: #444;
	line-height: 1.6;
	margin: 0 0 30px 0;
}

.eg-modal-actions {
	display: flex;
	align-items: center;
	gap: 25px;
	flex-wrap: wrap;
}

.eg-modal-actions .enneagram-button {
	padding: 14px 28px;
	font-size: 17px;
}

.eg-modal-link {
	color: var(--enneagram-primary-color);
	font-size: 17px;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s;
}

.eg-modal-link:hover {
	color: var(--enneagram-secondary-color);
	text-decoration: underline;
}

body.modal-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.eg-modal {
		padding: 30px 25px;
		margin: 10px;
	}

	.eg-modal-title {
		font-size: 28px;
		padding-right: 30px;
	}

	.eg-modal-description {
		font-size: 16px;
	}

	.eg-modal-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 15px;
	}

	.eg-modal-actions .enneagram-button {
		width: 100%;
		text-align: center;
	}

	.eg-modal-link {
		text-align: center;
	}
}