.station-part-wrapper {
    position: relative;
    margin-bottom: 10px;
    padding-left: 180px;  /* Match Redmine's standard label width */
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Container for the entire station-parts section */
#station-parts-container {
    margin: 0;
    padding: 5px 0;
    clear: both;
    position: relative;  /* For absolute positioning of add button */
}

/* Labels above the first row */
.field-labels {
    position: relative;
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    padding-left: 180px;  /* Match Redmine's standard label width */
}

.field-label {
    font-weight: bold;
    color: #161616;
    font-size: 0.9em;
    flex: 1;
    max-width: 340px;  /* Match Redmine's standard input width */
}

/* Style for select elements */
.station-select {
    width: 300px !important;  /* Force consistent width for all station dropdowns */
    flex: none;  /* Prevent flex growth */
}

.part-select {
    width: 400px !important;
    flex: none;  /* Allow parts dropdown to grow if needed */
}

.station-select,
.part-select {
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 2px;
    height: 24px;
    background-color: white;
    font-size: 0.9em;
}

/* Remove button styling */
.remove-station-part {
    padding: 2px 8px;
    height: 24px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
    cursor: pointer;
    color: #666;
    white-space: nowrap;
    font-size: 0.9em;
    min-width: 60px;
}

.remove-station-part:hover {
    background-color: #f8f8f8;
    border-color: #bbb;
}

/* Add button styling */
#add-station-part {
    display: block;
    margin-left: 560px;  /* 180px (label) + 300px (station) + 10px (gap) + 400px (part) */
    margin-top: 5px;
    padding: 2px 8px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
    cursor: pointer;
    color: #666;
    font-size: 0.9em;
    height: 24px;
}

#add-station-part:hover {
    background-color: #f8f8f8;
    border-color: #bbb;
}

/* Disabled state for selects */
select:disabled {
    background-color: #ebebe4;
    color: #aaa;
    cursor: not-allowed;
}

/* Ensure consistent width for all dropdowns */
select {
    box-sizing: border-box;
}

/* Match standard form field widths */
#issue_station_id,
#issue_fault_id,
#issue_solution_ids,
#issue_part_id {
    width: 340px;  /* Match Redmine's standard input width */
}

/* Fix for Firefox select height */
@-moz-document url-prefix() {
    .station-select,
    .part-select,
    #issue_station_id,
    #issue_fault_id,
    #issue_solution_ids,
    #issue_part_id {
        height: 24px;
        padding: 0 2px;
    }
} 