.cme-quiz-container {
    max-width: none;  /* Remove max-width to allow full-width */
    width: 100%;      /* Ensure it takes up the full width */
    margin: 0 auto;
    padding: 1rem;
}

.quiz-step {
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.quiz-question-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.4;
    min-height: 80px;
}

@media (max-width: 768px) {
    .quiz-question-title {
        min-height: 100px;
        font-size: 1.25rem;
    }
}

.quiz-instructions {
    margin-bottom: 1rem;
}

.quiz-options {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    justify-items: center;
    width: 100%;
}

@media (min-width: 640px) {
    .quiz-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .quiz-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

.quiz-option {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: block;
    width: 100%;
    max-width: 400px; /* Limit the option's max width */
    aspect-ratio: 2 / 3;
    position: relative;
}

.quiz-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.quiz-option:hover img {
    border-color: #0073aa;
}

@media (max-width: 639px) {
    .quiz-option {
        max-width: 150px;
        height: auto;
    }

    .quiz-option img {
        border-width: 1px;
    }
}

.quiz-input {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.quiz-submit-btn {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.quiz-submit-btn:hover {
    background-color: #005177;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.quiz-nav-btn {
    background: none;
    border: none;
    color: #0073aa;
    font-size: 1rem;
    cursor: pointer;
}

.quiz-nav-btn:hover {
    text-decoration: underline;
}

.quiz-restart {
    text-align: center;
    margin-top: 2rem;
}

.quiz-restart a {
    color: #0073aa;
    text-decoration: underline;
    font-size: 0.95rem;
}

/* Final Step Enhancements */
#final-step {
    margin-top: 2rem;
    padding: 2rem;
    background: #f4f4f4;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Container for first/last name row */
.final-name-row {
    display: flex;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.final-name-row .field-group {
    flex: 1;
    min-width: 120px;
}

#final-step label {
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
    font-weight: bold;
}

#final-step input[type="text"],
#final-step input[type="email"] {
    padding: 10px;
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
}

#final-step input::placeholder {
    color: #999;
    font-style: italic;
}

#final-step input:focus {
    outline: none;
    border-color: #0073aa;
}

#submit-button {
    margin-top: 1rem;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    width: 100%;
    max-width: 400px;
    transition: background-color 0.3s ease;
}

#submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#submit-button:hover:not(:disabled) {
    background-color: #005177;
}
#submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.5);
}