:root {
    --app-navigation-top-height: 60px;
    --app-navigation-bottom-height: 100px;
    --app-content-padding: 20px 20px 150px 20px;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    height: 100vh;
}

.app-navigation-top,
.app-navigation-bottom {
    position: sticky;
    z-index: 1000;
    width: 100%;
    max-width: 700px;
    box-sizing: border-box;
    background-color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-content: center;
}

.app-navigation-top {
    top: 0;
    padding: 0 20px;
}

.app-navigation-bottom {
    bottom: 0;
    padding: 30px 10px;
    border-top: 1px solid var(--dark-grey);
}

.app-wrapper {
    flex-grow: 1; /* Takes up available space */
    box-sizing: border-box; /* Includes padding in the height calculation */
    width: 100%;
}

.app-start-screen,
.questions-container,
.app-results-page {
    height: calc(100vh - var(--app-navigation-top-height) - var(--app-navigation-bottom-height));
    padding: var(--app-content-padding);
}

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -ms-overflow-style: none;
    /* Hides scrollbar for IE and Edge */
    scrollbar-width: none;
    /* Hides scrollbar for Firefox */
}

.app-start-screen {
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px 0;
}

.app-results-page {
    position: relative;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow: auto;
}

button#next {
    margin-left: auto;
}



div#questionsContainer::-webkit-scrollbar {
    display: none;
}

.image-wrapper {
    border-radius: 8px 8px 0 0;
    margin: -10px -10px 0 -10px;
    position: relative;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    min-height: 200px;
}

.image-wrapper.app-main-image {
    margin: 0;
    width: 100%;
    height: 20%;
}

.img-overlay {
    border-radius: 8px 8px 0 0;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--ca-blue);
    opacity: 0.1;
    pointer-events: none;
}




.progress-container {
    margin: 20px 0
}

.progress-bar-wrapper {

    border-bottom: 1px solid var(--dark-grey);
    padding: 20px;
}

.app-wrapper .progress-bar-fill {
    background-color: var(--accent);
}






.question-item {
    display: flex;
    position: relative;
    padding: 25px;
    box-shadow: var(--reg-box-shadow);
    border-radius: var(--reg-radius);
    border: var(--item-border);
    flex-direction: column;
    scroll-snap-align: start;
}


.question-statement {
    flex-basis: 45%;
    flex-grow: 1;
    margin-bottom: 0px;
}

.question-buttons {
    display: flex;
    flex-basis: 25%;
    justify-content: space-between;
    margin: 0 -25px 0 -25px;
}

.question-buttons input {
    width: 30px;
    height: 30px;

}

.question-rank {
    display: flex;
    flex-basis: 25%;
    justify-content: space-between;
    margin: -25px -25px 0 -25px;
}

.question-rank div {
    width: 80px;
    text-align: center;
    color: var(--vd-grey);
    font-size: small;
}

.question-rank-legend {
    display: flex;
    justify-content: space-between;
    font-size: small;
    color: var(--vd-grey);
    margin: -5px 10px;
}

.radio-button input[type="radio"] {
    display: none;
}


.radio-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    /* adjusted for larger clickable area */
    height: 80px;
    /* adjusted for larger clickable area */

    position: relative;
}

.radio-button input[type="radio"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
    /* ensure it's above the custom styling */
}


.radio-button span {
    display: inline-block;
    width: 30px;
    /* adjusted size */
    height: 30px;
    border: 2px solid var(--accent);
    /* using the given variable for color */
    border-radius: 50%;
    /* make it round */
    transition: background 0.3s, border-color 0.3s;
}

/* checked state */
.radio-button input[type="radio"]:checked+span {
    background-color: var(--accent);
    /* using the given variable for color */
}

.radio-button input[type="radio"]:checked+span::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-color: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid white;
}

/*  Hover & Focus States */
.radio-button:hover span,
.radio-button input[type="radio"]:focus+span {
    border-color: darken(var(--accent), 10%);
    /* slightly darker border on hover/focus */
}





.app-results-page .graph {
    height: 500px;
}


.app-results-page .results-details {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 50px;
}

.app-results-page .results-details .detailed-results {
    display: flex;
    gap: 0 30px;
    flex-basis: 250px;
    flex-grow: 1;
}

.category-sum {
    color: var(--white);
    background-color: var(--accent);
    width: 32px;
    min-width: 32px;
    height: 32px;
    flex-basis: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}