body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #daede2; /* Main background color */
}

.page {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: row;
    background-color: #daede2; /* Ensure the page background matches the body */
    font-family: 'Poppins', sans-serif;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px;
    background-color: #daede2; /* Match container background to body */
    box-sizing: border-box; /* Ensure padding is included in the width */
}

.header {
    display: flex;
    justify-content: space-between; /* Align items horizontally */
    align-items: center; /* Align items vertically */
    margin-bottom: 20px;
    background-color: #daede2; /* Match header background to body */
}

.header > div {
    display: flex;
    align-items: center; /* Vertically align items */
    width: 100%;
}

.header img.logo-image-small {
    max-width: 150px;
    margin-bottom: 10px; /* Add margin below the logo */
}

.button-group {
    margin-top: 20px;
}

h2, h3 {
    color: #333;
    margin: 0;
    font-weight: bold; /* Make all headers bold */
    font-size: 1.5em; /* Default font size for h2 and h3 */
}

h1 {
    margin-top: 20px; /* Add margin above the h1 */
    font-size: 2em; /* Default font size for h1 */
    font-weight: bold; /* Make all headers bold */
}

.dropdown {
    margin-bottom: 20px; /* Add margin below the dropdown */
}

form {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px; /* Optional: add border radius for a softer look */
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
textarea {
    width: 100%; /* Adjust width to account for padding and border */
    padding: 10px;
    border: 1px solid #ddd;
    box-sizing: border-box; /* Include padding and border in the element's total width */
    margin: 0; /* Ensure no extra margin */
}

button, .btn {
    width: 100%; /* Ensure all buttons have the same width */
    font-size: 13px; /* Set a consistent font size for all buttons */
}

button:disabled, .button:disabled, .btn:disabled {
    cursor: not-allowed;
}

button:hover:not(:disabled), .button:hover:not(:disabled), .btn:hover:not(:disabled) {
    font-weight: bold;
    font-size: 14px;
}

.btn-primary {
    background: #006666; /* Dark teal color */
}

.btn-primary:hover {
    background: #004d4d !important; /* Slightly darker teal on hover */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #daede2; /* Match table background to body */
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
    background-color: #daede2; /* Match cell background to body */
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

.feature-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    margin-bottom: 20px;
    background-color: #daede2; /* Match the grid background to the body */
    font-family: 'Poppins', sans-serif;
    color: #333;
    padding: 10px;
    border-radius: 5px;
}

.feature-item {
    display: contents;
}

.feature-number {
    font-size: 2em;
    font-weight: bold;
}

.feature-number,
.feature-text,
.feature-button {
    align-self: center;
}

.feature-button {
    position: relative; /* Position relative to allow absolute positioning of the tooltip */
}

.feature-button .tooltip {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    width: max-content;
    white-space: nowrap;
}

.feature-button:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px;
    }

    .feature-grid {
        grid-template-columns: 1fr; /* Stack items vertically */
        gap: 20px; /* Increase gap for better spacing */
    }

    .feature-item {
        display: grid;
        grid-template-columns: auto 1fr; /* Two columns: number and text/button */
        gap: 10px;
    }

    .feature-number {
        grid-column: 1 / 2; /* Number in the first column */
    }

    .feature-text, .feature-button {
        grid-column: 2 / 3; /* Text and button in the second column */
    }

    .button-group {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .button-group .btn {
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
    }
    
    h1 {
        font-size: 8vw; /* Increase font size for h1 on mobile */
    }

    h2, h3 {
        font-size: 5vw; /* Adjust the font size for h2 and h3 on mobile */
    }

    p {
        font-size: 4vw; /* Ensure paragraph text is smaller than header text */
    }

    .header {
        flex-direction: row; /* Ensure items are in a row */
        justify-content: space-between; /* Align items horizontally */
        align-items: center; /* Vertically align items */
    }

    .header > div {
        flex-direction: row; /* Ensure items are in a row */
        align-items: center; /* Vertically align items */
    }

    .logo-container {
        margin-right: auto;
        margin-bottom: 10px;
        width: 150px; /* Adjust width for mobile */
    }

    .dropdown {
        align-self: flex-start;
        margin-left: auto;
    }
}

.logo-container {
    position: relative;
    width: 200px;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo-link::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.logo-image-small {
    max-width: 100%;
    height: auto;
    display: block;
}

h2, h3 {
    color: #333;
    margin: 0;
    font-size: 1.5em; /* Default font size for h2 and h3 */
}

/* survey styles */
.question-button {
    max-width: 300px; /* Set a maximum width for the button */
    white-space: normal; /* Allow text to wrap */
    text-align: left; /* Align text to the left for better readability */
    word-wrap: break-word; /* Break long words if necessary */
    overflow-wrap: break-word; /* Ensure text will wrap to a new line for long questions */
    height: 100%; /* Make all buttons in a row the same height */
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.question {
    height: 100%; /* Ensure the question container takes full height */
    display: flex;
    flex-direction: column;
}

.navigation-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}

.text-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;
    color: #006666; /* Dark teal color */
    width: auto; /* Allow the button to size to its content */
    transition: font-weight 0.3s ease; /* Smooth transition for font-weight change */
}

.text-button:hover {
    font-weight: bold;
}

#backButton::before {
    content: '←';
    margin-right: 5px;
}

#backButton:disabled {
    color: #4a4a4a;
    cursor: not-allowed;
}

#backButton:disabled:hover {
    font-weight: normal; /* Prevent bolding when disabled */
}

#continueButton, #submitButton {
    font-weight: bold;
}

/* Add this media query for desktop */
@media (min-width: 769px) {
    .navigation-buttons {
        justify-content: flex-end; /* Align buttons to the right on desktop */
    }

    .text-button {
        margin-left: 20px; /* Add some space between buttons */
    }

    #backButton {
        margin-right: auto; /* Push the back button to the left */
    }
}

/* Add this for body chart */
.bodyChart {
    display: inline-block;
    margin: 10px;
    position: relative;
    width: 300px;
    height: 600px;
    background-color: white;
}

.bodyChart img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none; /* Allow clicks to pass through to SVG */
}

.bodyChart svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.body-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.gender-selection {
    text-align: center;
    margin: 20px 0;
}
