
:root {
    --Default_Text: #333;
    --Light_Text: #666;
    --navy: #152a69;
    --navy_over: #EBAA3F;
    --orange: #EBAA3F;
    --orange_shadow: #cf8714a4;
    --body : #f5f7fa;
    --element: #f9f9f9;
    --element_border: #ccc;
    --element_shadow: #f0f0f0;
    --element_shadow_dark: #e0e0e0;
    --element_contrast: #f8f9fa;

    --base-padding: 12px;
    --small-padding: 8px;
    --medium-padding: 16px;
    --large-padding: 24px;

    --font-main: 'Roboto', sans-serif;
  }

body {
    font-size: 1.1rem;
    font-family: var(--font-main);
    display: block;
    margin: 0px;
    line-height: 1.5;
    color: var(--Default_Text);
    background-color: var(--body);
    min-height: 100vh;
}

footer {
    position: relative;
    width: 100%;
    margin: 0px;
    background-color: var(--body);
    text-align: center;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    line-height: 1.2em; /* slightly looser line height */
    margin: 0.5em 0; /* reduces top/bottom margin */
    padding: 0.5em 1em; /* reduces top/bottom padding */
    color: var(--navy);
    font-size: 1.5em;
    font-weight: 500;
}

h2 {
    margin-top: 0.5em;
    margin-bottom: var(--small-padding);
    padding: var(--small-padding);
    text-align: center;
    color: var(--navy);
    font-size: 1.3em;
    font-weight: 500;
}

p{
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    text-align: justify;
    padding: var(--small-padding);
}

a{
    text-decoration: none;
    font-weight: bold;
    color: var(--navy);
}

a:hover {
    color: var(--navy_over);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: var(--medium-padding);
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {background-color: #f5f5f5;}

label {
    margin-left: 1em;
    margin-bottom: var(--small-padding);
    margin-top: 2px;
    margin-right: 10px !important;
}

.button,button,#submit, #submit1, .modal-content input[type="submit"] {
    height: auto;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
    padding: var(--small-padding) var(--medium-padding);
    background-color: var(--navy);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    flex-grow: 0;
}

.button:active, button:active {
    transform: scale(1);
}


.mainmenu {
    position: sticky;
    top: 0;
    padding: var(--small-padding) 15vw; /* Padding around the content */
    display: flex;
    justify-content: space-between;
    background-color: var(--orange);
    z-index: 150;
    box-shadow:0 2px 1px var(--orange_shadow);
}

.mainmenu-item { 
    flex-grow: 1;
}

.mainmenu-item a {
    text-align: center;
    text-transform: uppercase;  
    font-size: 0.9em;
    color: var(--body);
    text-decoration: none;
    padding: var(--small-padding);
}

.mainmenu-item a:hover {
    color: var(--navy_over);
}

.form-body {
    margin: 0;
    padding: 0;
}

.form-container {
    display: flex;
}

.form-content {
    margin-left: 240px; /* Adjust to fit side menu */
    margin-right: 470px; /* Adjust to fit chatbot */
    margin-top: 60px; /* Ensure spacing from horizontal menu */
    padding: 20px;
}



.form-ai_panel {
    position: fixed;
    right: 0;
    top: 40px; /* Align with the top nav */
    width: 450px; /* Adjust the width */
    height: calc(100vh - 40px); /* Fit height */
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--element_border);
    background-color: var(--element);
    box-shadow: 0 4px 8px var(--element_shadow);
    z-index: 101; /* Ensure it's above other elements */
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #ddd;
    z-index: 1000;
}

.progress-bar {
    height: 5px;
    background: #007bff;
    width: 0%;
    transition: width 0.3s ease;
}

.container {
    margin-left: 15vw ;
    margin-right:15vw ;
    margin-bottom: var(--large-padding);
    margin-top: 0 !important;
    padding-top: 0 !important;
    flex: 1;
}

.container-nobottom {
    margin-left: 15vw ;
    margin-right:15vw ;
    flex: 1;
}

div.list-item {
    margin-bottom: var(--small-padding);
    max-height: 800em !important;
}

div.list-item.S{
    display: flex;
    flex-direction: row;
}

.list-item div.S {
    display: flex;
    flex-direction: column;
    background: var(--element);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-top: var(--medium-padding);
    padding-bottom: var(--medium-padding);
   width: 100%;
    max-height: none;
    padding: var(--medium-padding);
    padding-right: var(--large-padding);
}

div.list-container{
    flex-direction: column;
    flex-wrap: nowrap;
    flex-grow: 1;
    max-height: 600em !important;
    clear: both; /* Ensure it doesn't get affected by floating elements */
}

div.grow{
    max-height: 600em !important;
    display: flex;
    width: 100%;
}

li::marker {
    color: var(--navy);
  }

.indexaccent {
    border: 2px solid var(--navy);
    background-color: var(--navy);
    color: var(--element);
    font-weight: bold;
    -webkit-border-radius: 30px; /* Safari and older browsers */
    border-radius: 30px;
    padding: 0 var(--medium-padding);
}

.footer {
    width: 100%;
    background-color: var(--orange);
    color: var(--element);
    text-align: center;
}

.footer-flex {
    display: flex;
    flex-wrap: nowrap;   
}

.footer-last {
    display: flex;
    background-color: var(--navy);
    padding: var(--small-padding);
    justify-content: right;
}

.footer-item {
    flex-grow: 1;
}

.footer-item-fix {
    flex-grow: 0;
}

.hidden {
    display: none !important;
    height: 0;
    width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .form-content {
        margin-left: var(--large-padding); 
        margin-right: 320px; /* Adjust to fit chatbot */
    }

    .form-ai_panel {
        position: fixed;
        right: 0;
        top: 100px; /* Align with the top nav */
        width: 300px; /* Adjust the width */
        height: calc(100vh - 100px); /* Fit height */
        display: flex;
        flex-direction: column;
        border-left: 1px solid var(--element_border);
        background-color: var(--element);
        box-shadow: 0 4px 8px var(--element_shadow);
        z-index: 101; /* Ensure it's above other elements */
    }
}

@media screen and (max-width: 768px) {
    .form-container {
        flex-direction: column;
    }

    .form-content {
        width: 100%;
        padding: 0.5em;
    }

    .form-ai_panel {
        width: 100%;
        height: auto;
        position: relative;
    }

    .question {
        margin-top: .5em;
        margin-bottom: 0.5em;
    }

    .question label {
        margin-left: 0;
        margin-bottom: 0.5em;
    }

    div.list-item.S {
        flex-direction: column;
    }

    .list-item div.S {
        padding: 0.8em;
    }
    
    .mainmenu {
        padding: 0.25em 5vw;
        flex-wrap: wrap;
    }

    .mainmenu-item {
        flex-basis: 50%;
        text-align: center;
    }
}

/* Make elements more touch-friendly on mobile */
@media screen and (max-width: 480px) {
    
    button, 
    .button,
    input[type="submit"] {
        padding: 12px 20px;
        width: 100%;
        margin: 5px 0;
    }

    input[type="radio"] {
        transform: scale(1.2);
        margin: 8px;
    }

    .side-nav {
        flex-direction: column;
        align-items: stretch;

    }

    .side-nav a {
        margin: 2px 0;
        padding: 8px;
        text-align: center;
    }
}







/* Grayed-out style for buttons */
.hintButton.grayed-out {
    background-color: lightgray;
    color: darkgray;
    cursor: pointer; /* Still clickable */
}

/* Active (enabled) style for buttons */
.hintButton:not(.grayed-out) {
    background-color: var(--navy);
    color: var(--element);
    cursor: pointer;
}

/* Styling for the "Required" legend */
.required-legend {
    color: red;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none; /* Initially hidden */
}

.required-legend.show {
    display: block !important; /* Ensure visibility */
}

.hintButton {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    padding: var(--small-padding);
    width: 35px; /* Small initial size for icon */
    height: 35px;
    border-radius: 10px;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.3s ease-in-out;
    /*position: relative;*/
    font-size: 0.7em;
    margin-left: auto; /* Change from margin-left: 1em to auto */
    margin-top: -3em;
    margin-bottom: 0;
    border-radius: 8px;
    display: block;
    pointer-events: auto; /* Ensure buttons are clickable */
}

/* Icon is fully visible initially */
.chatbot-icon {
    width: 20px;
    height: 20px;
    transition: opacity 0.3s ease-in-out;
}

/* Text starts hidden */
.hint-text {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    transition: opacity 0.3s ease-in-out;
}

/* Expand button on hover */
.hintButton:hover {
    width: auto; /* Expand to fit text */
    padding: var(--small-padding) var(--medium-padding);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transform: scale(1.07);
    border-radius: 8px;
}

/* Hide icon when hovering */
.hintButton:hover .chatbot-icon {
    opacity: 0;
    width: 0;
    height: 0;
    transition: none;
}

/* Show text when hovered */
.hintButton:hover .hint-text {
    opacity: 1;
    visibility: visible;
    position: relative; /* Keep inside the button */
}