/* Importing a font similar to Apple's San Francisco for a clean look */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #313131;
    color: #000000;

}

header {
    background-color: ##eae8e8;;
    color: #ffffff;
    text-align: center;
    padding-top: 20px;
    box-shadow: 1 2px 4px rgba(0,0,0,0.1);
}

h1 {
    font-weight: 600;
    margin: 0;
    padding: 1px;
}

#input-section, #duration-selection, #graph-section {
    max-width: 800px;
    margin: 30px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 4px rgb(0 0 0 / 11%);
    border-radius: 25px;
    text-align: center;

}

#graph-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    box-sizing: border-box;

}

canvas {
    width: 100% !important;
    height: auto !important;
}

.input-field {
    display: flex;
    align-items: center;
    margin: 10px 0;

}

label {
    flex-shrink: 0;
    width: 260px;
    margin: 10px;
    text-align: center;
        font-size: 1.2rem;


}

input[type=number], button {
    flex-grow: 1;
    padding: 10px;
    border: 3px solid #3d3e49;
    border-radius: 15px;
    margin-left: auto;
    box-sizing: border-box;
    text-align: center;
    font-size: 1.2rem;


}

button {
    padding: 10px 15px;
    font-size: 1.3rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    border-radius: 20px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    border: 2px solid #2b2b2b;
    outline: none;
    margin: 3px;
    width: auto;
}

button.primary {
    background-color: #35719f;
    color: #fffefe;
}

button.primary:hover {
    background-color: #005ecb;
}

button.secondary {
    background-color: #ded891;
    color: #000000;
    border-color: #0000ff;
}

button.secondary:hover {
    background-color: #8f83ff;
}

button.greyed-out {
    background-color: #8e92ff;
    color: #223791;
    cursor: not-allowed;
}

.results-container, .supplement-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 20px auto;
    max-width: 800px;
    background-color: #fff;
    border-radius: 40px;

}

.results-section, .supplement-container {
    background-color: #fff;
    padding: 10px;
    box-shadow: 3 2px 4px rgb(255 255 255 / 10%);
    border-radius: 35px;
    margin-bottom: 10px;

}

.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    align-items: flex-start;


}

.supplement-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap; /* Prevents wrapping to a new line */
    width: 100%; /* Use the full width available */
}

.supplement-container span {
    margin: 20px; /* Space between question and buttons */
}

/* Optional: Adjust button spacing */
button.secondary {
    margin-left: 5px;
    margin-right: 5px;

}

.hidden {
    display: none;

}

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #fff;
    table-layout: fixed;
    word-wrap: break-word;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

h3 {
    text-align: center;
    font-size: 0.7rem;
}

input[type=number], button {
    width: calc(100% - 12px);

}

.table-container { /* Assuming your table is inside a container with this class */
    width: 100%;
    overflow-x: auto; /* Allows scrolling on small screens */
}


@media (max-width: 600px) {
    .input-field label {
        display: block;
        width: 100%;
        margin-bottom: 5px;
        text-align: center;
    }

    .input-field input[type="number"], .input-field button, #annualProfit {
        width: 100%;
        padding: 10px;
        margin: 5px 0;
        box-sizing: border-box;
    }

    /* Ensure the input fields do not have flex properties on small screens */
    .input-field {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media screen and (max-width: 480px) {
    th, td {
        padding: 4px;
        font-size: 0.8rem;
    }

    h3 {
        font-size: 0.6rem;
    }

    /* Add any other styles you need for smaller screens here */
}
