/* General styling for the body */
html {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: #f5f5f5;
    color: #1a1a1a;
    padding: 10px;
    line-height: 1.6;
    min-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Container styling */
.container {
    width: 100%;
    max-width: 500px;
    min-width: 280px;
    margin: 10px auto;
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    text-align: center;
}

.container h1 {
    font-size: 28px;
    text-align: center;
    margin-top: 0px;
    margin-bottom: 32px;
    color: #9C27B0;
    font-weight: 600;
    background-color: #FAF5FC;
    padding: 12px 16px;
    border-radius: 4px;
}

/* Ensure alignment and spacing of input groups */
.input-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Consistent styling for labels */
.input-group label {
    width: 180px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    color: #333;
}

/* Input field and dropdown styling */
.input-group input,
.input-group select {
    width: 150px;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    background: #f9f9f9;
    color: #1a1a1a;
    transition: all 0.2s;
    text-align: right;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #0066cc;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Dropdown specific */
select {
    text-align-last: right;
}

/* Read-only steroid reference input fields */
.steroid-reference {
    background-color: #e3f2fd;
    border: 1px solid #0066cc;
    font-weight: 600;
}

/* Full width for the copyable text area */
.full-width {
    width: 100%;
}

textarea {
    width: 100%;
    resize: none;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.85em;
}

/* Specific styling for bsaOutput to remove read-only styles */
#bsaOutput {
    background-color: #ffffff; /* Default background */
    border: 1px solid #ccc;    /* Default border */
    font-weight: normal;       /* Normal font weight */
}

/* Remove spinner controls from number inputs */

/* Since Height and Weight are now type="text", spinner controls are already removed */

/* Toast Notification Styling */
#toast {
    visibility: hidden; /* Hidden by default */
    min-width: 100px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 10px;
    position: fixed;
    z-index: 1000; /* Ensure it appears above other elements */
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 14px;
}

/* Show the toast when the "show" class is added */
#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Fade-in animation */
@keyframes fadein {
    from { bottom: 20px; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

/* Fade-out animation */
@keyframes fadeout {
    from { bottom: 30px; opacity: 1; }
    to { bottom: 20px; opacity: 0; }
}

/* Mobile Responsive Styles */
@media screen and (max-width: 480px) {
    body {
        margin: 0;
        padding: 5px;
    }

    .container {
        margin: 5px auto;
        padding: 15px 12px;
        min-width: 260px;
    }

    .container h1 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .input-group {
        margin-bottom: 10px;
    }

    .input-group label {
        width: 150px;
        font-size: 13px;
        white-space: nowrap;
    }

    .input-group input,
    .input-group select {
        width: 120px;
        font-size: 12px;
        padding: 8px 10px;
        min-height: 32px;
    }
}
