/* Emergency Fund Calculator Layout Fix */
.finqna-calculator.emergency-fund .fi-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center; /* vertically align label + input */
    margin-bottom: 1em;  /* spacing between rows */
    width: 100%;         /* stretch full width of calculator */
}

/* Label takes natural width, no forced column */
.finqna-calculator.emergency-fund .fi-label-wrap {
    flex: 0 0 auto; /* shrink to content width */
    margin-right: 0.5em;
    width: 40%;
}

/* Input takes remaining space but limited for numeric entry */
.finqna-calculator.emergency-fund .fi-input {
    flex: 1 1 auto;   /* take remaining space */
    max-width: 180px; /* numeric input box limited width */
    min-width: 50px;  /* ensure not too small */
    box-sizing: border-box;
}

/* Mobile: stack input below label, full width */
@media (max-width: 767px) {
    .finqna-calculator.emergency-fund .fi-section {
        flex-direction: column;
        align-items: stretch;  /* inputs stretch to container width */
    }

    .finqna-calculator.emergency-fund .fi-label-wrap {
        margin-right: 0;
        margin-bottom: 0.25em;
        width: 100%; /* label full width */
    }

    .finqna-calculator.emergency-fund .fi-input {
        max-width: 100%; /* fill container */
        width: 100%;
    }
}
