/* General Reset and Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Assessment Container Styling */
.assessment-container,
.results-container, 
.landing-page-container {
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 50px;
    max-width: 75%; /* Constrained max width */
    background-color: var(--container-background-color, inherit);
    font-family: var(--body-font-family, inherit);
    color: var(--text-color, inherit);
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.1);
    min-height: 70vh;
}

/* Override max-width for assessment-container when inside landing page */
.landing-page .assessment-container {
    max-width: 100% !important;
}

/* Assessment Container Content Styling */
.assessment-container-content,
.landing-page-container-content {
    margin: 0 auto;
    padding: 20px;
    max-width: 65%; /* Constrained max width */
}

.assessment-title,
.landing-page-title {
    margin-top: 50px;
}

.assessment-form {
    margin-top: 50px;
}

/* Responsive Design for Progress Bar */
@media (max-width: 600px) {
    .assessment-container-content,
    .landing-page-container-content {
        padding: 0px;
        max-width: 100%;
    }
    .assessment-container,
    .results-container,
    .landing-page-container {
        margin: 0 auto;
        padding: 20px;
        max-width: 100%;
        min-height: 50vh;
    }
}

/* Apply body background color */
body {
    background-color: var(--background-color, inherit);
}

/* Title styles */
.assessment-container h1,
.assessment-container h2,
.assessment-container h3,
.assessment-container h4,
.assessment-container h5,
.assessment-container h6,
.results-container h1,
.results-container h2,
.results-container h3,
.results-container h4,
.results-container h5,
.results-container h6,
.landing-page-container-content h1,
.landing-page-container-content h2,
.landing-page-container-content h3,
.landing-page-container-content h4,
.landing-page-container-content h5,
.landing-page-container-content h6 {
    font-family: var(--font-family, inherit);
    color: var(--title-color, inherit);
    margin-bottom: 10px;
}

/* Description and Question Text */
.assessment-container p,
.results-container p,
.landing-page-container-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Basic styles for the landing page */
.landing-page {
    max-width: 100% !important;
}

.assessment-logo {
    text-align: center;
    margin-bottom: 20px;
}

.assessment-logo img {
    max-width: 150px;
    height: auto;
}

/* Bottom Progress Bar Section */
.bottom-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--container-background-color, #f7f7f7);
    height: 60px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Progress Label */
.progress-label {
    margin-bottom: 5px;
    color: var(--text-color, #000);
    font-size: 16px;
    text-align: center;
}

/* Progress Bar Container */
.progress-bar {
    width: 40%;
    height: 8px;
    background-color: var(--progress-background-color, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
}

/* Progress */
.progress {
    width: 0%;
    height: 100%;
    background-color: var(--progress-bar-color, #043425);
    transition: width 0.3s ease;
}

/* Responsive Design for Progress Bar */
@media (max-width: 600px) {
    .bottom-progress-bar {
        height: 50px;
    }
    .progress-bar {
        width: 90%;
    }
    .progress-label {
        font-size: 14px;
    }
}

/* Back Button Styling */
.back-button {
    position: relative;
    padding: 0;
    background: none;
    color: var(--text-color, #2D2926);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    border: none;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

.back-button:hover {
    color: var(--button-hover-background, #043425);
    text-decoration: underline;
}

.back-button:hover::before {
    margin-right: 8px;
}

/* Responsive Design for Back Button */
@media (max-width: 600px) {
    .back-button {
        font-size: 12px;
    }
}

/* Answer List Styling */
.answer-list,
.landing-page-buttons {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Answer Buttons */
.answer-button,
.landing-button {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 500;
    color: var(--button-text-color, #FFFFFF);
    background-color: var(--button-background-color, #2D2926);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
    text-align: left;
    text-transform: none !important;
}

.answer-button:hover,
.landing-button:hover {
    background-color: var(--button-hover-background, #043425);
    transform: translateY(-2px);
}

.answer-button:focus,
.landing-button:focus {
    outline: none;
}

/* Alignment Classes for Welcome Text and Buttons */

.landing-page-container-content.align-left .landing-page-welcome-text {
    text-align: left;
}

.landing-page-container-content.align-left .landing-page-buttons .landing-button {
    text-align: left;
}

/* Center Alignment */
.landing-page-container-content.align-center .landing-page-welcome-text {
    text-align: center;
}

.landing-page-container-content.align-center .landing-page-buttons .landing-button {
    text-align: center;
}

/* Center alignment for answer buttons */
.align-center .answer-button {
    text-align: center;
}

/* Responsive Design for Answer Buttons */
@media (max-width: 768px) {
    .answer-button,
    .landing-button {
        font-size: 14px;
        padding: 12px;
    }
}

@media (max-width: 576px) {
    .answer-button,
    .landing-button {
        font-size: 12px;
        padding: 10px;
    }
}

/* User Info Form */
.user-info input[type="text"],
.user-info input[type="email"] {
    font-family: var(--body-font-family, inherit);
    color: var(--text-color, inherit);
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    margin-bottom: 15px;
}

.user-info label {
    color: var(--text-color, inherit);
}

.user-info button[type="submit"] {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 500;
    color: var(--button-text-color, #FFFFFF);
    background-color: var(--button-background-color, #2D2926);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.user-info button[type="submit"]:hover {
    background-color: var(--button-hover-background, #043425);
}

/* Responsive Design for User Info Form */
@media (max-width: 600px) {
    .assessment-container {
        padding: 15px;
    }
    .landing-page-container-content {
        padding: 15px;
    }
    .answer-button,
    .landing-button {
        font-size: 14px;
    }
    .progress-bar {
        height: 15px;
    }
    .progress-label {
        font-size: 12px;
    }
}

/* Score Bar Styles */
.score-bar {
    height: 20px;
    background-color: var(--score-bar-color, inherit);
    margin-bottom: 10px;
    border-radius: 5px;
}

.dimension-result h4 {
    margin-top: 0;
    color: var(--title-color, inherit);
}

.dimension-result h5 {
    margin-bottom: 5px;
}

.dimension-result p {
    margin: 5px 0;
    color: var(--text-color, inherit);
}

/* Style for the container that holds the name fields */
.name-fields {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.name-fields input[type="text"] {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    font-size: 16px;
}

/* Responsive Design for Name Fields */
@media (max-width: 600px) {
    .name-fields {
        flex-direction: column;
        gap: 0;
    }
}

/* Alignment classes */
.align-left {
    text-align: left;
}

.align-center {
    text-align: center;
}

.question-container .question-text,
.question-container .answer-list {
    text-align: inherit;
}

.align-center .answer-list {
    align-items: stretch;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Full viewport height */
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #2D2926;
    animation: spin 1s linear infinite;
}

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

/* Assessment Loading Spinner */
.assessment-loading-spinner {
    position: fixed; /* Position it relative to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Full viewport height */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's on top of other elements */
    flex-direction: column; /* Stack spinner and text vertically */
}

.assessment-loading-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--container-background-color, inherit);
    opacity: 0.8; /* Adjust opacity as desired */
    z-index: -1; /* Place the pseudo-element behind the spinner content */
}

.assessment-loading-spinner .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #2D2926;
    animation: spin 1s linear infinite;
    margin-bottom: 15px; /* Add space between spinner and text */
}

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